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:
|
||||
release:
|
||||
types: [created]
|
||||
push:
|
||||
# run only against tags
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
# packages: write
|
||||
# issues: write
|
||||
|
||||
jobs:
|
||||
releases-matrix:
|
||||
name: Release Go Binary
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# build and publish in parallel: linux/amd64
|
||||
goos: [linux, darwin, windows]
|
||||
goarch: [amd64, arm64, arm, 386]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run tests
|
||||
run: go test -v -p=1 -timeout=0 ./...
|
||||
- uses: wangyoucao577/go-release-action@v1.16
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
goos: ${{ matrix.goos }}
|
||||
goarch: ${{ matrix.goarch }}
|
||||
project_path: "."
|
||||
binary_name: "GoShod"
|
||||
ldflags: "-s -w"
|
||||
extra_files: LICENSE README.md
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Fetch all tags
|
||||
run: git fetch --force --tags
|
||||
-
|
||||
name: Set up Go
|
||||
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