chore: make lint happy #73
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: Build Js Port | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.18 | |
- name: Install peg | |
run: | | |
go install github.com/fy0/pigeon@latest | |
- name: Install gopherjs | |
run: | | |
go get -u github.com/gopherjs/[email protected] | |
go install github.com/gopherjs/[email protected] | |
- name: Code gen | |
run: pigeon -nolint -optimize-parser -o roll.peg.go roll.peg | |
- name: Build | |
run: gopherjs build github.com/sealdice/dicescript/jsport -o jsport/dicescript.cjs | |
- name: Bundle ESM | |
run: cd ./jsport && yarn && yarn build | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.MY_TOKEN }} | |
publish_dir: ./jsport |