chore: wasm tests only on ubuntu #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
# Release on every push for now | |
#on: | |
# push: | |
# tags: | |
# - v* | |
on: [push, pull_request] | |
env: | |
GO_VERSION: "1.21.1" | |
NODE_VERSION: "18.17.1" | |
PNPM_VERSION: "8.5.1" | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.2.2 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
run_install: | | |
- cwd: frontend | |
- name: Build wasm | |
run: go build -ldflags="-s -w" -v -o frontend/static/go-pob.wasm ./wasm | |
env: | |
GOOS: js | |
GOARCH: wasm | |
- name: Build frontend | |
working-directory: frontend | |
run: | | |
pnpm run build | |
ls -lah build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./frontend/build | |
exclude_assets: '' |