-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (35 loc) · 1.06 KB
/
release-build.yaml
File metadata and controls
36 lines (35 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Manual Release Build
on:
release:
types: [created]
workflow_dispatch:
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64, arm64]
goversion: ["1.17"]
exclude:
- goarch: "386"
goos: darwin
- goarch: "386"
goos: windows
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v3
- name: Set BUILD_VERSION env
run: echo "RELEASE_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: ${{ matrix.goversion }}
project_path: "./cmd/"
binary_name: "jsonpath"
overwrite: true
ldflags: -X "main.Command=jsonpath" -X "main.Version=${{ env.RELEASE_TAG }}" -X "main.OS=${{ matrix.goos }}" -X "main.Arch=${{ matrix.goarch }}"