Skip to content

Publish package to npmjs #33

Publish package to npmjs

Publish package to npmjs #33

# NOTE: taken from https://github.com/MylesBorins/node-osc/blob/main/.github/workflows/bump-version.yml
name: Publish package to npmjs
on:
release:
types: [created]
jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build
env:
GSAP_TOKEN: ${{ secrets.GSAP_TOKEN }}
run: |
npm config set //npm.greensock.com/:_authToken=$GSAP_TOKEN
npm config set @gsap:registry=https://npm.greensock.com
npm ci
npm run build
- name: Publish
run: npm --verbose
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}