@@ -8,6 +8,12 @@ name: Publish
88 release :
99 types :
1010 - 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
1117
1218env :
1319 # hack to get dynlibs working with musl
@@ -21,39 +27,34 @@ jobs:
2127 fail-fast : false
2228 matrix :
2329 node_version :
24- - 14
2530 - 16
2631 - 18
32+ - 20
2733 system :
2834 - os : macos-12
2935 target : x86_64-apple-darwin
30- - os : ubuntu-22.04
36+ arch : x64
37+ - os : buildjet-2vcpu-ubuntu-2204
3138 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
3243 - os : windows-2019
3344 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
4748 arch : arm64
4849 steps :
4950 - uses : actions/checkout@v2
5051 with :
51- ref : ${{ github.event.release.tag_name }}
52+ ref : ${{ github.event.release.tag_name }}${{ github.ref }}
5253 - uses : c-hive/gha-yarn-cache@v1
5354 - uses : actions/setup-node@v2.1.5
5455 with :
5556 node-version : ${{ matrix.node_version }}
56- architecture : ${{ matrix.arch }}
57+ architecture : ${{ matrix.system. arch }}
5758 - uses : actions-rs/toolchain@v1
5859 with :
5960 profile : minimal
@@ -75,26 +76,33 @@ jobs:
7576 cd bin-package
7677 echo "asset=$(echo *.tar.gz)" >> "$GITHUB_OUTPUT"
7778 - 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
7980 env :
8081 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8182
8283 publish-github-docker :
83- runs-on : ubuntu-22.04
84+ runs-on : ${{ matrix.os }}
8485 container :
8586 image : node:${{ matrix.node_version }}-alpine
8687 strategy :
8788 fail-fast : false
8889 matrix :
8990 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
9397 steps :
9498 - 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
96104 with :
97- ref : ${{ github.event.release.tag_name }}
105+ ref : ${{ github.event.release.tag_name }}${{ github.ref }}
98106 - uses : c-hive/gha-yarn-cache@v1
99107 - uses : actions-rs/toolchain@v1
100108 with :
@@ -112,11 +120,12 @@ jobs:
112120 - name : Upload release asset
113121 run : |
114122 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
116124 env :
117125 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118126
119127 publish-npm :
128+ if : ' ${{ github.event.release.tag_name }}'
120129 needs :
121130 - publish-github
122131 - publish-github-docker
@@ -128,7 +137,7 @@ jobs:
128137 - uses : c-hive/gha-yarn-cache@v1
129138 - uses : actions/setup-node@v2.1.5
130139 with :
131- node-version : 14
140+ node-version : 16
132141 - uses : actions-rs/toolchain@v1
133142 with :
134143 profile : minimal
0 commit comments