v0.4.5 #9
Workflow file for this run
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
name: Release | |
on: | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
release-matrix: | |
name: release Binary | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# build and publish in parallel: linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64 | |
goos: [linux, windows, darwin] | |
goarch: [amd64, arm64] | |
exclude: | |
- goarch: arm64 | |
goos: windows | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: wangyoucao577/go-release-action@v1 | |
with: | |
pre_command: | | |
echo "machine github.com login ${{ github.actor }} password ${{ secrets.MICK_GITHUB_TOKEN }}" > ~/.netrc | |
chmod 600 ~/.netrc | |
git config --global --add url."https://github.com/".insteadOf "ssh://[email protected]/" | |
git config --global --add url."https://github.com/".insteadOf "[email protected]" | |
go env -w GOPRIVATE=github.com/upsun/* | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
project_path: "./cmd/" | |
build_flags: -v | |
ldflags: -X "version.VERSION=${{ github.ref_name }}" | |
# -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }} | |
extra_files: LICENSE README.md | |