Skip to content

Prepare 0.84.0 release (#394) #66

Prepare 0.84.0 release (#394)

Prepare 0.84.0 release (#394) #66

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
jobs:
prepare:
strategy:
matrix:
GOOS: [linux, windows, darwin]
GOARCH: ["386", amd64, arm64, ppc64le, arm]
exclude:
- GOOS: darwin
GOARCH: "386"
- GOOS: windows
GOARCH: arm64
- GOOS: darwin
GOARCH: arm
- GOOS: windows
GOARCH: arm
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: sigstore/cosign-installer@v2
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64,ppc64le,linux/arm/v7
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v4
with:
go-version: '~1.21'
check-latest: true
- name: Generate distribution sources
run: make generate-sources
- name: Log into Docker.io
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: goreleaser/goreleaser-action@v4
if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit
with:
distribution: goreleaser-pro
version: latest
args: release --clean --split --timeout 2h
env:
GOOS: ${{ matrix.GOOS }}
GOARCH: ${{ matrix.GOARCH }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
COSIGN_EXPERIMENTAL: true
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- uses: actions/upload-artifact@v3
with:
name: all-artifacts
path: dist/*/*
release:
name: Release
runs-on: ubuntu-20.04
needs: prepare
permissions:
id-token: write
packages: write
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: sigstore/cosign-installer@v2
- uses: anchore/sbom-action/download-syft@v0.14.3
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64,ppc64le
- uses: docker/setup-buildx-action@v2
- uses: actions/setup-go@v4
with:
go-version: '~1.21'
check-latest: true
- uses: actions/download-artifact@v3
with:
name: all-artifacts
path: dist
- name: Log into Docker.io
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Login to GitHub Package Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v4
if: steps.cache.outputs.cache-hit != 'true' # do not run if cache hit
with:
distribution: goreleaser-pro
version: latest
args: continue --merge --timeout 2h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_EXPERIMENTAL: true
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}