-
Notifications
You must be signed in to change notification settings - Fork 18
58 lines (53 loc) · 1.69 KB
/
release.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release GoCommands
on:
release:
types: [created]
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-20.04
strategy:
matrix:
goos: ["linux"]
goarch: ["386", "amd64", "arm", "arm64"]
include:
- goos: "windows"
goarch: "386"
- goos: "windows"
goarch: "amd64"
- goos: "darwin"
goarch: "amd64"
- goos: "darwin"
goarch: "arm64"
env:
PKG: "github.com/cyverse/gocommands"
steps:
- name: "set build date"
run: echo "BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
goversion: 1.18
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./cmd/"
binary_name: "gocmd"
ldflags: "-X ${{ env.PKG }}/commons.clientVersion=${{ github.ref_name }} -X ${{ env.PKG }}/commons.gitCommit=${{ github.sha }} -X ${{ env.PKG }}/commons.buildDate=${{ env.BUILD_DATE }}"
update-releases:
name: Update Release Go Binary
runs-on: ubuntu-20.04
needs: releases-matrix
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify the version of Python to use
- name: Install dependencies
run: python -m pip install --upgrade pip && pip install requests
- name: Run Python script
run: |
python .github/workflows/update_release_table.py ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}