feat: mantis project can read text from a file
#39
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
| # Publishes when you push a version tag (e.g. v1.0.1). | |
| # Requires repo secret NPM_TOKEN: granular token with publish access + "Bypass 2FA for automation" | |
| # (otherwise publish fails with EOTP). Classic "Automation" tokens also work. | |
| name: Publish to npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| registry-url: 'https://registry.npmjs.org' | |
| # Bun is needed for the build step (prepublishOnly -> bun build). | |
| # Runtime/install never needs Bun; this is build-time only. | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Set version from tag | |
| run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version | |
| - run: npm ci | |
| - run: npm pkg fix | |
| - run: npm publish --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |