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