Skip to content

Commit

Permalink
try to generate pre-built binaries via CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Nov 27, 2023
1 parent a1e684e commit 22bd37b
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
# Generate the release with goreleaser to include pre-built binaries
goreleaser:
needs: version_bump
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
Expand All @@ -95,19 +95,27 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: 1.21.1
- name: make release-dry-run
run: make release-dry-run
- name: setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GORELEASER_ACCESS_TOKEN}}' > .release-env
- name: release publish
run: make release

# Import the GPG key from Github secrets to sign the binaries
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
# - name: Import GPG key
# id: import_gpg
# uses: crazy-max/ghaction-import-gpg@v6
# with:
# gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
# passphrase: ${{ secrets.GPG_PASSPHRASE }}
# Generate the binaries, release, and sign the checksum
- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# - uses: goreleaser/goreleaser-action@v5
# with:
# distribution: goreleaser
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 comments on commit 22bd37b

Please sign in to comment.