Skip to content

Publish package

Publish package #9

Workflow file for this run

name: Publish package
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
permissions:
contents: read
packages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Set version number to environment variable
run: |
node -p -e '`RELEASED_PACKAGE_VERSION=v${require("./package.json").version}`' >> $GITHUB_ENV
- run: yarn install
- run: yarn run build
env:
NODE_ENV: "production"
- name: Upgrade npm to latest version
run: npm install -g npm@latest
- name: Publish package
run: |
npm publish --access public --tag latest