forked from acheong08/ChatGPT-API-server
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.08 KB
/
release.yml
File metadata and controls
39 lines (34 loc) · 1.08 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
37
38
39
name: Release Go Binaries
on:
release:
types: [created]
workflow_dispatch:
env:
CMD_PATH: ./
jobs:
releases-matrix:
name: Release Matrix
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64,arm64]
exclude:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v2
- name: Set APP_VERSION env
run: echo APP_VERSION=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev ) >> ${GITHUB_ENV}
- name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date) >> ${GITHUB_ENV}
- name: Environment Printer
uses: managedkaos/[email protected]
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.ACTIONS_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "${{ env.CMD_PATH }}"
build_flags: -v
ldflags: -X "main.appVersion=${{ env.APP_VERSION }}" -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }}