Skip to content

Commit

Permalink
potentially help goreleaser out
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Apr 22, 2024
1 parent 913fe25 commit dcbb105
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/goreleaser-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,11 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16.18.1
- name: Setup SHA variable
shell: bash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Setup Cache
uses: actions/[email protected]
with:
path: dist/${{ matrix.goos }}
key: ${{ matrix.goos }}-${{ env.sha_short }}
key: ${{ matrix.goos }}-${{ github.ref_name }}
enableCrossOsArchive: true
- name: Install Dependencies
if: matrix.goos == 'linux'
Expand All @@ -49,6 +46,11 @@ jobs:
- name: Build web
shell: bash
run: make build-web
- name: Get Previous Tag
id: prev
uses: WyriHaximus/github-action-get-previous-tag@v1
env:
INPUT_PREFIX: v
- name: GoReleaser (Build)
uses: goreleaser/goreleaser-action@v4
with:
Expand All @@ -63,6 +65,7 @@ jobs:
GITLAB_CLIENT_SECRET: ${{ secrets.GITLAB_CLIENT_SECRET }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
GORELEASER_PREVIOUS_TAG: ${{ steps.release.outputs.prev }}

# Release binaries with GoReleaser
release:
Expand All @@ -86,17 +89,17 @@ jobs:
uses: actions/[email protected]
with:
path: dist/linux
key: linux-${{ env.sha_short }}
key: linux-${{ github.ref_name }}
- name: Restore Darwin Cache
uses: actions/[email protected]
with:
path: dist/darwin
key: darwin-${{ env.sha_short }}
key: darwin-${{ github.ref_name }}
- name: Restore Windows Cache
uses: actions/[email protected]
with:
path: dist/windows
key: windows-${{ env.sha_short }}
key: windows-${{ github.ref_name }}
enableCrossOsArchive: true
- name: Get Previous Tag
id: prev
Expand Down

0 comments on commit dcbb105

Please sign in to comment.