-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use goreleaser docker image for cross compile in release step (#68)
- Loading branch information
Showing
3 changed files
with
94 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,23 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
|
||
- v* | ||
jobs: | ||
goreleaser: | ||
runs-on: macos-latest | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # this is important, otherwise it won't checkout the full tree (i.e. no previous tags) | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.22 | ||
cache: true | ||
- uses: goto-bus-stop/setup-zig@v2 | ||
- name: Set output | ||
id: macos_sdk | ||
run: echo "path=$(xcrun --show-sdk-path)" >> $GITHUB_OUTPUT | ||
- uses: goreleaser/goreleaser-action@v4 # run goreleaser | ||
with: | ||
version: latest | ||
args: release --clean | ||
env: | ||
SDK_PATH: ${{ steps.macos_sdk.outputs.path }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
submodules: 'true' | ||
- run: git fetch --prune --unshallow | ||
- name: setup dependencies | ||
uses: actions/setup-go@v2 | ||
- name: release dry run | ||
run: make release-dry-run | ||
- name: setup release environment | ||
run: |- | ||
echo 'GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}' > .release-env | ||
- name: release publish | ||
run: make release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters