mirror of
https://github.com/jayateertha043/goshod.git
synced 2026-07-21 20:11:02 +00:00
Update release.yml
This commit is contained in:
parent
291e3ae81f
commit
160cc6eac0
1 changed files with 35 additions and 21 deletions
56
.github/workflows/release.yml
vendored
56
.github/workflows/release.yml
vendored
|
|
@ -1,28 +1,42 @@
|
||||||
name: Release Go binaries
|
name: goreleaser
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [created]
|
# run only against tags
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
# packages: write
|
||||||
|
# issues: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
releases-matrix:
|
goreleaser:
|
||||||
name: Release Go Binary
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
# build and publish in parallel: linux/amd64
|
|
||||||
goos: [linux, darwin, windows]
|
|
||||||
goarch: [amd64, arm64, arm, 386]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
-
|
||||||
- name: Run tests
|
name: Checkout
|
||||||
run: go test -v -p=1 -timeout=0 ./...
|
uses: actions/checkout@v2
|
||||||
- uses: wangyoucao577/go-release-action@v1.16
|
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
fetch-depth: 0
|
||||||
goos: ${{ matrix.goos }}
|
-
|
||||||
goarch: ${{ matrix.goarch }}
|
name: Fetch all tags
|
||||||
project_path: "."
|
run: git fetch --force --tags
|
||||||
binary_name: "GoShod"
|
-
|
||||||
ldflags: "-s -w"
|
name: Set up Go
|
||||||
extra_files: LICENSE README.md
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
-
|
||||||
|
name: Run GoReleaser
|
||||||
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
with:
|
||||||
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
|
distribution: goreleaser
|
||||||
|
version: latest
|
||||||
|
args: release --rm-dist
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||||
|
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue