feat: 支持$开头的变量名,与rollvm v1兼容 #55
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" ] | |
pull_request: | |
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 get -u github.com/pointlander/peg@v1.0.1 | |
go install github.com/pointlander/peg@v1.0.1 | |
- name: Install gopherjs | |
run: | | |
go get -u github.com/gopherjs/gopherjs@v1.18.0-beta1 | |
go install github.com/gopherjs/gopherjs@v1.18.0-beta1 | |
- name: Code gen | |
run: peg -switch -inline roll.peg | |
- name: Build | |
run: gopherjs build github.com/sealdice/dicescript/jsport -o jsport/dicescript.js | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.MY_TOKEN }} | |
publish_dir: ./jsport |