Skip to content

Npm directory update #12

Npm directory update

Npm directory update #12

Workflow file for this run

name: Npm directory update
on:
workflow_dispatch:
schedule:
# Once per month, on an offset date/time because apparently GHA has
# problems with spikes of scheduled jobs at midnight etc.
- cron: 30 13 15 * *
jobs:
publish:
name: Build, bump & publish to npm
runs-on: ubuntu-latest
container: httptoolkit/act-build-base:v3.0.0
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- run: npm ci
# Check that the tests and overall build all still pass:
- run: npm test
- run: npm run build
# Create the new release:
- name: Bump version & push
run: |
git config --global user.name 'Automated publish'
git config --global user.email '[email protected]'
npm version patch
git push && git push --tags
# Publish the release to npm:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}