Skip to content

Publish NPM package #116

Publish NPM package

Publish NPM package #116

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish NPM package
on:
workflow_dispatch:
workflow_run:
workflows: ["Auto Release"]
types: [completed]
release:
types: [created]
env:
TOKEN_LISTS_ACTIONS_OR_CI_BUILD: true
DAPP_RADAR_PROJECT_ID: ${{ secrets.DAPP_RADAR_PROJECT_ID }}
DAPP_RADAR_API_KEY: ${{ secrets.DAPP_RADAR_API_KEY }}
API_AUTH_TOKEN_GITHUB: ${{ secrets.API_AUTH_TOKEN_GITHUB }}
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: sudo apt-get update -y
- run: sudo apt-get install -y librsvg2-bin libimagequant-dev pkg-config libpng-dev
- run: npm install -g yarn
- run: yarn --version
- run: yarn
- run: yarn start
- run: npm run publish-token-package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}