0.25.0 #7
Workflow file for this run
This file contains hidden or 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: Publish | |
| on: | |
| push: | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+ | |
| jobs: | |
| build: | |
| uses: "./.github/workflows/ci.yml" | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| - name: Download prebuilds | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: prebuilds | |
| pattern: prebuilds-* | |
| merge-multiple: true | |
| - name: List prebuilds | |
| run: tree prebuilds | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Publish to NPM | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Prepare release artifacts | |
| run: | | |
| mkdir -p dist | |
| for dir in prebuilds/*/; do | |
| platform=$(basename "$dir") | |
| cp "$dir/tree-sitter.node" "dist/tree-sitter-$platform.node" | |
| done | |
| ls -l dist | |
| - name: Create release | |
| run: |- | |
| gh release create ${{ github.ref_name }} --generate-notes dist/* | |
| env: | |
| GH_TOKEN: ${{ github.token }} |