Skip to content

Commit

Permalink
Add initial release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks committed Feb 29, 2024
1 parent 6a4d8be commit 4459dac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '20'

- name: Install dependencies
run: npm ci

- name: Build wasm binary
run: npx tree-sitter build-wasm
- name: Build artifacts
run: npm install && npm run build && stat tree-sitter-sql.wasm

- name: Get the version
id: get_version
Expand All @@ -46,6 +43,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./path/to/your.wasm
asset_name: your.wasm
asset_content_type: application/octet-stream
asset_path: ./tree-sitter-sql.wasm
asset_name: tree-sitter-sql.wasm
asset_content_type: application/octet-stream
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ package-lock.json
/src/tree_sitter/
/src/parser.c
/src/*.json
tree-sitter-sql.wasm
a.out.js
a.out.wasm
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"test": "tree-sitter test",
"install": "tree-sitter generate && node-gyp rebuild",
"release": "commit-and-tag-version"
"release": "commit-and-tag-version",
"build-wasm": "tree-sitter build-wasm",
"build": "npm run build-wasm"
},
"author": "derek stride",
"license": "MIT",
Expand Down

0 comments on commit 4459dac

Please sign in to comment.