@@ -8,6 +8,12 @@ name: Publish
8
8
release :
9
9
types :
10
10
- created
11
+ # workflow_dispatch is just for testing, and it won't fully work.
12
+ workflow_dispatch :
13
+ inputs :
14
+ name :
15
+ description : fake version name
16
+ required : true
11
17
12
18
env :
13
19
# hack to get dynlibs working with musl
@@ -21,39 +27,34 @@ jobs:
21
27
fail-fast : false
22
28
matrix :
23
29
node_version :
24
- - 14
25
30
- 16
26
31
- 18
32
+ - 20
27
33
system :
28
34
- os : macos-12
29
35
target : x86_64-apple-darwin
30
- - os : ubuntu-22.04
36
+ arch : x64
37
+ - os : buildjet-2vcpu-ubuntu-2204
31
38
target : x86_64-unknown-linux-gnu
39
+ arch : x64
40
+ - os : buildjet-4vcpu-ubuntu-2204-arm
41
+ target : arm64-unknown-linux-gnu
42
+ arch : arm64
32
43
- os : windows-2019
33
44
target : x86_64-pc-windows-msvc
34
- arch :
35
- - x64
36
- include :
37
- # only node 15+ supports arm64 natively, so we only need to build 16 for now
38
- - system :
39
- os : [self-hosted, macOS, ARM64]
40
- target : aarch64-apple-darwin
41
- node_version : 16
42
- arch : arm64
43
- - system :
44
- os : [self-hosted, macOS, ARM64]
45
- target : aarch64-apple-darwin
46
- node_version : 18
45
+ arch : x64
46
+ - os : [self-hosted, macOS, ARM64]
47
+ target : aarch64-apple-darwin
47
48
arch : arm64
48
49
steps :
49
50
- uses : actions/checkout@v2
50
51
with :
51
- ref : ${{ github.event.release.tag_name }}
52
+ ref : ${{ github.event.release.tag_name }}${{ github.ref }}
52
53
- uses : c-hive/gha-yarn-cache@v1
53
54
54
55
with :
55
56
node-version : ${{ matrix.node_version }}
56
- architecture : ${{ matrix.arch }}
57
+ architecture : ${{ matrix.system. arch }}
57
58
- uses : actions-rs/toolchain@v1
58
59
with :
59
60
profile : minimal
@@ -75,26 +76,33 @@ jobs:
75
76
cd bin-package
76
77
echo "asset=$(echo *.tar.gz)" >> "$GITHUB_OUTPUT"
77
78
- name : Upload release asset
78
- run : gh release upload ${{ github.event.release.tag_name }} bin-package/${{ steps.build.outputs.asset }} --clobber
79
+ run : gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} bin-package/${{ steps.build.outputs.asset }} --clobber
79
80
env :
80
81
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
82
82
83
publish-github-docker :
83
- runs-on : ubuntu-22.04
84
+ runs-on : ${{ matrix.os }}
84
85
container :
85
86
image : node:${{ matrix.node_version }}-alpine
86
87
strategy :
87
88
fail-fast : false
88
89
matrix :
89
90
node_version :
90
- - ' 14'
91
- - ' 16'
92
- - ' 18'
91
+ - 16
92
+ - 18
93
+ - 20
94
+ os :
95
+ - buildjet-2vcpu-ubuntu-2204
96
+ - buildjet-4vcpu-ubuntu-2204-arm
93
97
steps :
94
98
- run : apk add build-base git python3 wget github-cli
95
- - uses : actions/checkout@v2
99
+ # https://github.com/actions/runner/issues/801#issuecomment-1374967227
100
+ - run : |
101
+ apk add gcompat
102
+ sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
103
+ - uses : actions/checkout@v3
96
104
with :
97
- ref : ${{ github.event.release.tag_name }}
105
+ ref : ${{ github.event.release.tag_name }}${{ github.ref }}
98
106
- uses : c-hive/gha-yarn-cache@v1
99
107
- uses : actions-rs/toolchain@v1
100
108
with :
@@ -112,11 +120,12 @@ jobs:
112
120
- name : Upload release asset
113
121
run : |
114
122
git config --global --add safe.directory $(pwd)
115
- gh release upload ${{ github.event.release.tag_name }} bin-package/${{ steps.build.outputs.asset }} --clobber
123
+ gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} bin-package/${{ steps.build.outputs.asset }} --clobber
116
124
env :
117
125
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118
126
119
127
publish-npm :
128
+ if : ' ${{ github.event.release.tag_name }}'
120
129
needs :
121
130
- publish-github
122
131
- publish-github-docker
@@ -128,7 +137,7 @@ jobs:
128
137
- uses : c-hive/gha-yarn-cache@v1
129
138
130
139
with :
131
- node-version : 14
140
+ node-version : 16
132
141
- uses : actions-rs/toolchain@v1
133
142
with :
134
143
profile : minimal
0 commit comments