Skip to content

Commit

Permalink
Fix release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinocis committed Jan 9, 2025
1 parent ea12888 commit 66a9a6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,36 +25,24 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: "1.22"
cache: true

- name: Install TinyGo
run: |
wget https://github.com/tinygo-org/tinygo/releases/download/v0.30.0/tinygo_0.30.0_amd64.deb
sudo dpkg -i tinygo_0.30.0_amd64.deb
wget https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb
sudo dpkg -i tinygo_0.34.0_amd64.deb
- name: Get dependencies
run: |
go mod download
go mod verify
- name: Build WASM
run: |
mkdir -p build
tinygo build -o build/numscript.wasm -target wasm -no-debug ./
# Added -no-debug to reduce binary size
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean --rm-dist
args: release --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload WASM artifact
run: |
gh release upload ${{ github.event.release.tag_name }} build/numscript.wasm --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 2 additions & 5 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ builds:
- CGO_ENABLED=0
main: ./internal/numscript/numscript.go
goos:
- linux
- windows
- darwin
- wasip1
goarch:
- amd64
- arm64
- wasm
tool: "tinygo"
hooks:
pre:
Expand Down

0 comments on commit 66a9a6c

Please sign in to comment.