Skip to content

Commit

Permalink
ci: updates version of Go in goreleaser GH job
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Jan 9, 2025
1 parent 5fdf3e4 commit 9286893
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/goreleaser-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: goreleaser

on:
workflow_dispatch:
push:
tags:
- 'v*'
Expand All @@ -26,15 +27,15 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: v1.19
go-version: v1.22
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Delete non-semver tags
run: 'git tag -d $(git tag -l | grep -v "^v")'
- name: Set LDFLAGS
run: echo LDFLAGS="$(make ldflags)" >> $GITHUB_ENV
- name: Run GoReleaser on tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: contains(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
Expand All @@ -43,7 +44,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser on push without tag
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags/')
if: !contains(github.ref, 'refs/tags/')
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
Expand Down

0 comments on commit 9286893

Please sign in to comment.