Skip to content

Publish

Publish #10

Workflow file for this run

name: Publish
on:
workflow_dispatch:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
registry-url: "https://registry.npmjs.org"
- name: Update install script with current version
run: |
NEW_VERSION=$(node -pe "require('./package.json').version")
sed -i "s/%%VERSION%%/${NEW_VERSION}/g" ./scripts/install.js
cat ./scripts/install.js
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}