Skip to content

publish packages

publish packages #2

Workflow file for this run

name: publish packages
on:
# Run manually using GitHub UI
workflow_dispatch:
inputs:
version:
description: "Version to publish"
required: false
default: ""
release:
types: [published]
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Apply updates versions to packages and publish
run: |
VERSION=${{ github.event.inputs.version || github.ref_name }}
npx nx release version --specifier $VERSION
npx nx release publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true