v1.0.1 #54
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 to npm | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| # Only publish for parser releases (v*), not LSP releases (lsp-v*). | |
| # Allow manual dispatch (ref_name will be a branch or tag chosen by the operator). | |
| if: github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| # Pin npm to a known-good version: 11.5.2+ adds Trusted Publishing (OIDC) | |
| # support; 11.12.1 ships broken (missing `promise-retry`), so don't | |
| # blindly install latest. | |
| - run: npm install -g npm@11.11.1 | |
| - run: npm install | |
| - run: npm publish --provenance --access public |