mirror of
https://codeberg.org/gigirassy/pinata
synced 2026-08-30 15:27:39 +00:00
Update .github/workflows/release.yml
This commit is contained in:
@@ -1,35 +1,50 @@
|
||||
# .github/workflows/release.yml
|
||||
|
||||
name: Build & Release Go Binary
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
releases-matrix:
|
||||
name: Release Go Binary
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
goos: [linux, windows, darwin]
|
||||
goarch: ["386", amd64, arm64]
|
||||
goarch: ['386', amd64, arm64]
|
||||
exclude:
|
||||
- goarch: "386"
|
||||
goos: darwin
|
||||
- goarch: arm64
|
||||
goos: windows
|
||||
- goos: darwin
|
||||
goarch: '386'
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: wangyoucao577/go-release-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: ${{ matrix.goos }}
|
||||
goarch: ${{ matrix.goarch }}
|
||||
goversion: "https://dl.google.com/go/go1.24.8.linux-amd64.tar.gz"
|
||||
project_path: "./cmd/pinata"
|
||||
binary_name: "pinata"
|
||||
extra_files: LICENSE README.md
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set version tag
|
||||
id: version
|
||||
run: |
|
||||
VERSION="v$(date +'%Y%m%d%H%M%S')"
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
- name: Build Go Binary
|
||||
uses: wangyoucao577/go-release-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: ${{ matrix.goos }}
|
||||
goarch: ${{ matrix.goarch }}
|
||||
goversion: "https://dl.google.com/go/go1.24.8.linux-amd64.tar.gz"
|
||||
project_path: "./cmd/pinata"
|
||||
binary_name: "pinata"
|
||||
extra_files: LICENSE README.md
|
||||
- name: Create Git Tag
|
||||
run: |
|
||||
git tag ${{ env.VERSION }}
|
||||
git push origin ${{ env.VERSION }}
|
||||
- name: Create GitHub Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ env.VERSION }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user