Skip to content

Publish npm packages #172

Publish npm packages

Publish npm packages #172

Workflow file for this run

name: publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
npm-token:
description: npm token to be used to publish npm packages
required: false
remove-changesets:
default: false
description: Remove changesets to force a release
required: false
type: boolean
jobs:
publish:
name: Bump package versions and publish to npm.
environment: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: create_token
with:
app-id: ${{ vars.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
- name: Remove changesets if needed to force a release
if: ${{ inputs.remove-changesets == true }}
run: rm -f .changeset/*.md
- name: Build required packages
run: pnpm run build --filter=@inversifyjs/foundation-changelog-generator
- name: Create Release Pull or publish changes
uses: changesets/action@6d3568c53fbe1db6c1f9ab1c7fbf9092bc18627f # v1
with:
commit: "chore: bump package versions"
publish: pnpm run release
title: "[Changesets] Bump package versions"
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
NPM_TOKEN: ${{ inputs.npm-token }}