Skip to content

Commit

Permalink
github: try releasing from windows
Browse files Browse the repository at this point in the history
  • Loading branch information
benburkert committed Apr 14, 2024
1 parent b13690f commit 06fa58b
Showing 1 changed file with 5 additions and 30 deletions.
35 changes: 5 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ jobs:
with:
path: cmd/anchor/dist/linux
key: linux-${{ env.sha_short }}
enableCrossOsArchive: true
- uses: actions/cache@v4
if: matrix.os == 'macos-latest'
with:
path: cmd/anchor/dist/darwin
key: darwin-${{ env.sha_short }}
enableCrossOsArchive: true
- uses: actions/cache@v4
if: matrix.os == 'windows-latest'
with:
Expand All @@ -66,7 +68,7 @@ jobs:
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

release:
runs-on: ubuntu-latest
runs-on: windows-latest
needs: prepare
steps:
- name: Checkout
Expand All @@ -86,10 +88,12 @@ jobs:
with:
path: cmd/anchor/dist/linux
key: linux-${{ env.sha_short }}
enableCrossOsArchive: true
- uses: actions/cache@v4
with:
path: cmd/anchor/dist/darwin
key: darwin-${{ env.sha_short }}
enableCrossOsArchive: true
- uses: actions/cache@v4
with:
path: cmd/anchor/dist/windows
Expand All @@ -106,33 +110,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

publish:
runs-on: windows-latest
needs: release
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Copy Caches
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: cmd/anchor/dist/windows
key: windows-${{ env.sha_short }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser-pro
version: latest
args: publish --merge
workdir: cmd/anchor
env:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}

0 comments on commit 06fa58b

Please sign in to comment.