Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Publish Package

Publish Package #2

Workflow file for this run

name: 'Publish Package'
on:
workflow_dispatch:
inputs:
package:
type: choice
description: Package to Publish
options:
- core
- core-express
- core-mongo
- core-mongo-express
version:
type: choice
description: Version Increment
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
- prerelease
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/${{ github.event.inputs.package }}
permissions:
id-token: write
env:
COREPACK_ENABLE_STRICT: '0'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: npm version ${{ github.event.inputs.version }}
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push origin && git push --tags