-
Notifications
You must be signed in to change notification settings - Fork 20
75 lines (64 loc) · 1.6 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
name: Release
on:
push:
tags:
- r*
jobs:
integration:
uses: ./.github/workflows/integration.yml
generate-release-matrix:
runs-on: ubuntu-latest
outputs:
release-matrix: ${{ steps.generate-matrix.outputs.release-matrix }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Generate Release Matrix
id: generate-matrix
run: go run mage.go githubReleaseMatrix
release-build:
runs-on: ubuntu-latest
needs:
- integration
- generate-release-matrix
strategy:
matrix:
osarch: ${{ fromJson(needs.generate-release-matrix.outputs.release-matrix) }}
max-parallel: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Fetch tags
run: git fetch --prune --unshallow --tags -f
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: Release Build
run: go run mage.go release ${{ matrix.osarch }}
- uses: actions/upload-artifact@v3
with:
name: release
path: release/*
release:
runs-on: ubuntu-latest
needs:
- release-build
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: release
path: release
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
release/*