19
19
runs-on : ubuntu-latest
20
20
container :
21
21
image : golang:1.23-alpine
22
+ outputs :
23
+ version : ${{ steps.version.outputs.version }}
22
24
steps :
23
25
- name : Install apk dependencies
24
26
# tar: needed for actions/cache@v4
32
34
uses : actions/checkout@v4
33
35
with :
34
36
submodules : true
37
+ - name : Extract TinyGo version
38
+ id : version
39
+ run : ./.github/workflows/tinygo-extract-version.sh | tee -a "$GITHUB_OUTPUT"
35
40
- name : Cache Go
36
41
uses : actions/cache@v4
37
42
with :
@@ -120,15 +125,15 @@ jobs:
120
125
- name : Build TinyGo release
121
126
run : |
122
127
make release deb -j3 STATIC=1
123
- cp -p build/release.tar.gz /tmp/tinygo.linux-amd64.tar.gz
124
- cp -p build/release.deb /tmp/tinygo_amd64 .deb
128
+ cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }} .linux-amd64.tar.gz
129
+ cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_amd64 .deb
125
130
- name : Publish release artifact
126
131
uses : actions/upload-artifact@v4
127
132
with :
128
- name : linux-amd64-double-zipped
133
+ name : linux-amd64-double-zipped-${{ steps.version.outputs.version }}
129
134
path : |
130
- /tmp/tinygo.linux-amd64.tar.gz
131
- /tmp/tinygo_amd64 .deb
135
+ /tmp/tinygo${{ steps.version.outputs.version }} .linux-amd64.tar.gz
136
+ /tmp/tinygo_${{ steps.version.outputs.version }}_amd64 .deb
132
137
test-linux-build :
133
138
# Test the binaries built in the build-linux job by running the smoke tests.
134
139
runs-on : ubuntu-latest
@@ -152,11 +157,11 @@ jobs:
152
157
- name : Download release artifact
153
158
uses : actions/download-artifact@v4
154
159
with :
155
- name : linux-amd64-double-zipped
160
+ name : linux-amd64-double-zipped-${{ needs.build-linux.outputs.version }}
156
161
- name : Extract release tarball
157
162
run : |
158
163
mkdir -p ~/lib
159
- tar -C ~/lib -xf tinygo.linux-amd64.tar.gz
164
+ tar -C ~/lib -xf tinygo${{ needs.build-linux.outputs.version }} .linux-amd64.tar.gz
160
165
ln -s ~/lib/tinygo/bin/tinygo ~/go/bin/tinygo
161
166
- run : make tinygo-test-wasip1-fast
162
167
- run : make tinygo-test-wasip2-fast
@@ -297,6 +302,9 @@ jobs:
297
302
steps :
298
303
- name : Checkout
299
304
uses : actions/checkout@v4
305
+ - name : Get TinyGo version
306
+ id : version
307
+ run : ./.github/workflows/tinygo-extract-version.sh | tee -a "$GITHUB_OUTPUT"
300
308
- name : Install apt dependencies
301
309
run : |
302
310
sudo apt-get update
@@ -381,24 +389,24 @@ jobs:
381
389
- name : Download amd64 release
382
390
uses : actions/download-artifact@v4
383
391
with :
384
- name : linux-amd64-double-zipped
392
+ name : linux-amd64-double-zipped-${{ needs.build-linux.outputs.version }}
385
393
- name : Extract amd64 release
386
394
run : |
387
395
mkdir -p build/release
388
- tar -xf tinygo.linux-amd64.tar.gz -C build/release tinygo
396
+ tar -xf tinygo${{ needs.build-linux.outputs.version }} .linux-amd64.tar.gz -C build/release tinygo
389
397
- name : Modify release
390
398
run : |
391
399
cp -p build/tinygo build/release/tinygo/bin
392
400
cp -p build/wasm-opt build/release/tinygo/bin
393
401
- name : Create ${{ matrix.goarch }} release
394
402
run : |
395
403
make release deb RELEASEONLY=1 DEB_ARCH=${{ matrix.libc }}
396
- cp -p build/release.tar.gz /tmp/tinygo.linux-${{ matrix.goarch }}.tar.gz
397
- cp -p build/release.deb /tmp/tinygo_${{ matrix.libc }}.deb
404
+ cp -p build/release.tar.gz /tmp/tinygo${{ steps.version.outputs.version }} .linux-${{ matrix.goarch }}.tar.gz
405
+ cp -p build/release.deb /tmp/tinygo_${{ steps.version.outputs.version }}_${{ matrix.libc }}.deb
398
406
- name : Publish release artifact
399
407
uses : actions/upload-artifact@v4
400
408
with :
401
- name : linux-${{ matrix.goarch }}-double-zipped
409
+ name : linux-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
402
410
path : |
403
- /tmp/tinygo.linux-${{ matrix.goarch }}.tar.gz
404
- /tmp/tinygo_${{ matrix.libc }}.deb
411
+ /tmp/tinygo${{ steps.version.outputs.version }} .linux-${{ matrix.goarch }}.tar.gz
412
+ /tmp/tinygo_${{ steps.version.outputs.version }}_${{ matrix.libc }}.deb
0 commit comments