Skip to content

Commit 5bf3a68

Browse files
committed
ci: use TinyGo version in artifact files
This avoids needing to rename them ourselves (which is kinda annoying) and also avoids mistakes in the process.
1 parent 2a76ceb commit 5bf3a68

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/linux.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ jobs:
2020
container:
2121
image: golang:1.23-alpine
2222
steps:
23+
- name: Get TinyGo version
24+
id: version
25+
run: ./.github/workflows/tinygo-extract-version.sh >> "$GITHUB_OUTPUT"
26+
- name: TEST use version ${{ steps.version.outputs.version }}
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: linux-amd64-${{ steps.version.outputs.version }}-double-zipped
30+
path: |
31+
/tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz
32+
/tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb
33+
- name: exit
34+
run: program-does-not-exist
2335
- name: Install apk dependencies
2436
# tar: needed for actions/cache@v4
2537
# git+openssh: needed for checkout (I think?)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
# Extract the version string from the source code, to be stored in a variable.
4+
grep 'const version' goenv/version.go | sed 's/^const version = "\(.*\)"$/version=\1/g'

0 commit comments

Comments
 (0)