From 1119fead7edd9257cf482e15453d37431664abb6 Mon Sep 17 00:00:00 2001 From: Ricardo Melo Date: Thu, 31 Oct 2024 12:25:22 -0400 Subject: [PATCH] chore(workflow): update GitHub Actions versions and optimize release process - Upgrade actions/checkout to v4 - Upgrade actions/setup-go to v4 and set Go version to ">=1.21.0" with caching enabled - Add step to run Go tests - Add docker/setup-qemu-action@v3 for QEMU setup - Upgrade goreleaser/goreleaser-action to v5 and adjust release arguments - Remove redundant upload artifact step Signed-off-by: Ricardo Melo --- .github/workflows/release.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1b8c9e..d03a72e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,32 +8,29 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: - go-version: 1.16 + go-version: ">=1.21.0" + cache: true + - name: Run Tests + run: go test -v ./... + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Import GPG key id: import_gpg uses: crazy-max/ghaction-import-gpg@v3 with: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v5 with: + distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload assets - uses: actions/upload-artifact@v2 - with: - name: myapp - path: ./obs_switchscene - env: - GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -