Skip to content

Publish Package

Publish Package #9

name: Publish Package
on:
workflow_dispatch:
inputs:
version:
description: 'Version in semantic versioning format (i.e. 1.0.2)'
required: true
jobs:
package_publishing:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
env:
ACTIONS_STEP_DEBUG: true
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@salemove'
# - name: Authenticate to GitHub Packages
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
- name: Install dependencies
run: npm install
- run: npm ci
# Publishing packages
- run: npm pkg set version='${{ github.event.inputs.version }}'
- run: npm publish --tag stable