diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5ff85b0..6f3df0e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 - name: Set up Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb4ccbf938fde # v5.0.0 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: 'go.mod' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 878e09b..d6e8a72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb4ccbf938fde # v5.0.0 + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: 'go.mod' diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 47212bb..0a06576 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,6 +9,12 @@ dist: dist before: hooks: - go mod tidy + # Build WASM and console assets before the release build + - mkdir -p dist + - GOOS=js GOARCH=wasm go build -o dist/stmf.wasm ./pkg/wasm/stmf/ + - cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" dist/ 2>/dev/null || cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" dist/ + - go build -o borg main.go + - ./borg console build -p "borg-demo" -o dist/console.stim -s js/borg-stmf builds: - id: borg @@ -73,6 +79,10 @@ release: # By default goreleaser creates GitHub releases from tags. prerelease: auto mode: replace + extra_files: + - glob: 'dist/stmf.wasm' + - glob: 'dist/wasm_exec.js' + - glob: 'dist/console.stim' brews: - name: borg