0.1.46 #45
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 | |
| # Publish loopat to npm when a version tag is pushed. | |
| # | |
| # Release flow: | |
| # npm version patch # bumps package.json, commits, tags vX.Y.Z | |
| # git push origin main --tags | |
| # | |
| # Setup (one time): add the npm Automation token (bypasses 2FA) as a repo | |
| # secret named NPM_TOKEN — Settings -> Secrets and variables -> Actions. | |
| # Opt all JS actions into the Node 24 runtime (Node 20 is deprecated). | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Bun is needed to build web/dist (vite) during prepublishOnly. | |
| - uses: oven-sh/setup-bun@v2 | |
| # Node provides npm and wires NODE_AUTH_TOKEN into the registry. | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| # prepublishOnly runs `bun install && bun run build:web` for us. | |
| - run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |