-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6299320
commit 6fec500
Showing
3 changed files
with
87 additions
and
55 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build | ||
|
||
on: | ||
create: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
packages: write | ||
contents: write | ||
id-token: write | ||
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 | ||
|
||
- name: Publish to npmjs | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".node-version" | ||
registry-url: "https://npm.pkg.github.com" | ||
|
||
- name: Publish to github packages | ||
run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pack | ||
run: npm pack | ||
|
||
- name: Publish to Github Releases | ||
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d | ||
with: | ||
files: | | ||
*.tgz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
{ | ||
"name": "@wasm-fmt/gofmt", | ||
"author": "magic-akari <akari.ccino@gamil.com>", | ||
"version": "0.3.1", | ||
"description": "wasm based gofmt", | ||
"main": "lib.js", | ||
"types": "lib.d.ts", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./lib.d.ts", | ||
"default": "./lib.js" | ||
"name": "@wasm-fmt/gofmt", | ||
"author": "magic-akari <akari.ccino@gamil.com>", | ||
"version": "0.3.1", | ||
"description": "wasm based gofmt", | ||
"main": "lib.js", | ||
"types": "lib.d.ts", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"types": "./lib.d.ts", | ||
"default": "./lib.js" | ||
}, | ||
"./vite": { | ||
"types": "./lib.d.ts", | ||
"default": "./vite.js" | ||
}, | ||
"./package.json": "./package.json", | ||
"./*": "./*" | ||
}, | ||
"./vite": { | ||
"types": "./lib.d.ts", | ||
"default": "./vite.js" | ||
"scripts": { | ||
"go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js", | ||
"patch": "git apply ./go_wasm.patch", | ||
"build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go", | ||
"postbuild": "npm run go_wasm && npm run patch", | ||
"test": "node --test" | ||
}, | ||
"./package.json": "./package.json", | ||
"./*": "./*" | ||
}, | ||
"scripts": { | ||
"go_wasm": "cp $(tinygo env TINYGOROOT)/targets/wasm_exec.js ./go_wasm.js", | ||
"patch": "git apply ./go_wasm.patch", | ||
"build": "tinygo build -o=lib.wasm -target=wasm -no-debug -stack-size=24kb ./src/lib.go", | ||
"postbuild": "npm run go_wasm && npm run patch", | ||
"test": "node --test" | ||
}, | ||
"engines": { | ||
"node": ">=16.17.0" | ||
}, | ||
"keywords": [ | ||
"wasm", | ||
"golang", | ||
"formatter" | ||
], | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
"engines": { | ||
"node": ">=16.17.0" | ||
}, | ||
"keywords": [ | ||
"wasm", | ||
"golang", | ||
"formatter" | ||
], | ||
"license": "MIT", | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true | ||
} | ||
} |