1919 runs-on : ubuntu-latest
2020 container :
2121 image : golang:1.23-alpine
22+ outputs :
23+ version : ${{ steps.version.outputs.version }}
2224 steps :
2325 - name : Install apk dependencies
2426 # tar: needed for actions/cache@v4
3234 uses : actions/checkout@v4
3335 with :
3436 submodules : true
37+ - name : Extract TinyGo version
38+ id : version
39+ run : ./.github/workflows/tinygo-extract-version.sh | tee -a "$GITHUB_OUTPUT"
3540 - name : Cache Go
3641 uses : actions/cache@v4
3742 with :
@@ -120,15 +125,15 @@ jobs:
120125 - name : Build TinyGo release
121126 run : |
122127 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
125130 - name : Publish release artifact
126131 uses : actions/upload-artifact@v4
127132 with :
128- name : linux-amd64-double-zipped
133+ name : linux-amd64-double-zipped-${{ steps.version.outputs.version }}
129134 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
132137 test-linux-build :
133138 # Test the binaries built in the build-linux job by running the smoke tests.
134139 runs-on : ubuntu-latest
@@ -152,11 +157,11 @@ jobs:
152157 - name : Download release artifact
153158 uses : actions/download-artifact@v4
154159 with :
155- name : linux-amd64-double-zipped
160+ name : linux-amd64-double-zipped-${{ needs.build-linux.outputs.version }}
156161 - name : Extract release tarball
157162 run : |
158163 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
160165 ln -s ~/lib/tinygo/bin/tinygo ~/go/bin/tinygo
161166 - run : make tinygo-test-wasip1-fast
162167 - run : make tinygo-test-wasip2-fast
@@ -297,6 +302,9 @@ jobs:
297302 steps :
298303 - name : Checkout
299304 uses : actions/checkout@v4
305+ - name : Get TinyGo version
306+ id : version
307+ run : ./.github/workflows/tinygo-extract-version.sh | tee -a "$GITHUB_OUTPUT"
300308 - name : Install apt dependencies
301309 run : |
302310 sudo apt-get update
@@ -381,24 +389,24 @@ jobs:
381389 - name : Download amd64 release
382390 uses : actions/download-artifact@v4
383391 with :
384- name : linux-amd64-double-zipped
392+ name : linux-amd64-double-zipped-${{ needs.build-linux.outputs.version }}
385393 - name : Extract amd64 release
386394 run : |
387395 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
389397 - name : Modify release
390398 run : |
391399 cp -p build/tinygo build/release/tinygo/bin
392400 cp -p build/wasm-opt build/release/tinygo/bin
393401 - name : Create ${{ matrix.goarch }} release
394402 run : |
395403 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
398406 - name : Publish release artifact
399407 uses : actions/upload-artifact@v4
400408 with :
401- name : linux-${{ matrix.goarch }}-double-zipped
409+ name : linux-${{ matrix.goarch }}-double-zipped-${{ steps.version.outputs.version }}
402410 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