Skip to content

ci: update pnpm settings #12

ci: update pnpm settings

ci: update pnpm settings #12

Workflow file for this run

name: publish
on:
push:
tags:
- v*
permissions:
contents: read
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Important for changelog
filter: blob:none # We don't need all blobs
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
standalone: true
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: .node-version
registry-url: https://registry.npmjs.org/
cache: 'pnpm'
- run: pnpm install
- run: echo VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_ENV
- run: pnpm version ${VERSION}
- name: Generate changelog with git-cliff
uses: tj-actions/git-cliff@75599f745633e29f99bd9e14a30865b7d2fcbe84 # v1.5.0
with:
args: --latest --strip all
output: 'CHANGELOG.md'
- run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
bodyFile: 'CHANGELOG.md'
name: ${{ env.VERSION }}
prerelease: ${{ contains(github.ref_name, '-') }}