Skip to content

Commit

Permalink
chore(workflow): update GitHub Actions versions and optimize release …
Browse files Browse the repository at this point in the history
…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 <ricardo@cropa.ca>
  • Loading branch information
cropalato committed Oct 31, 2024
1 parent e376bff commit 1119fea
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 1119fea

Please # to comment.