Skip to content

Publish packages

Publish packages #7

Workflow file for this run

name: Publish packages
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
run-id:
required: false
type: string
workflow_call:
inputs:
run-id:
required: true
type: string
permissions:
pull-requests: write
contents: write # allow to craete Github release
id-token: write # for npm publish --provenance, see https://docs.npmjs.com/generating-provenance-statements
jobs:
publish:
if: ${{ github.repository == 'lejunyang/lun' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
run-id: ${{ inputs.run-id }}
- name: Create Release Pull Request and Publish to npm
uses: changesets/action@v1
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}