Skip to content

Commit

Permalink
ci: use TinyGo version in artifact files
Browse files Browse the repository at this point in the history
This avoids needing to rename them ourselves (which is kinda annoying)
and also avoids mistakes in the process.
  • Loading branch information
aykevl committed Oct 26, 2024
1 parent 2a76ceb commit 7c52ea6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ jobs:
container:
image: golang:1.23-alpine
steps:
- name: Get TinyGo version
id: version
run: ./.github/workflows/tinygo-extract-version.sh
- name: TEST use version ${{ steps.version.outputs.version }}
uses: actions/upload-artifact@v4
with:
name: linux-amd64-${{ steps.version.outputs.version }}-double-zipped
path: |
/tmp/tinygo${{ steps.version.outputs.version }}.linux-amd64.tar.gz
/tmp/tinygo_${{ steps.version.outputs.version }}_amd64.deb
- name: exit
run: program-does-not-exist
- name: Install apk dependencies
# tar: needed for actions/cache@v4
# git+openssh: needed for checkout (I think?)
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tinygo-extract-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

# Extract the version string from the source code, to be stored in a variable.
grep 'const version' goenv/version.go | sed 's/^const version = "\(.*\)"$/version=\1/g'

0 comments on commit 7c52ea6

Please sign in to comment.