Skip to content

Commit

Permalink
chore: update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Sep 2, 2023
1 parent a6c5233 commit e8eee08
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- run: npm run build

- name: Publish to npmjs
run: npm publish
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand All @@ -48,4 +48,4 @@ jobs:
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d
with:
files: |
*.tgz
wasm-fmt-*.tgz
16 changes: 12 additions & 4 deletions .github/workflows/build.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
name: Build
name: Test

on: [push, pull_request]

jobs:
build:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".node-version"
registry-url: "https://registry.npmjs.org"

- run: |
wget -P ${{ runner.temp }} https://github.com/tinygo-org/tinygo/releases/download/v0.28.1/tinygo_0.28.1_amd64.deb
yes | sudo dpkg -i ${{ runner.temp }}/tinygo_0.28.1_amd64.deb
- run: npm run build
- run: npm run test
- run: pnpm run /test/

- name: Package
run: npm pack

- name: Upload
uses: actions/upload-artifact@v3
with:
path: |
wasm-fmt-*.tgz
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
"patch": "git apply ./gofmt.patch",
"build": "tinygo build -o=gofmt.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go",
"postbuild": "npm run gofmt && npm run patch",
"test": "node --test"
"test:node": "node --test",
"test:deno": "deno test --allow-read"
},
"engines": {
"node": ">=16.17.0"
},
"publishConfig": {
"access": "public",
"provenance": true
"access": "public"
}
}

0 comments on commit e8eee08

Please sign in to comment.