Skip to content

chore(deps): update dependency pnpm to v9.15.1 (#289) #163

chore(deps): update dependency pnpm to v9.15.1 (#289)

chore(deps): update dependency pnpm to v9.15.1 (#289) #163

Workflow file for this run

name: Release
on:
push:
branches: [main]
jobs:
release:
if: startsWith(github.event.head_commit.message, 'release')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # for `npm publish --provenance`
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
persist-credentials: true
- uses: ./.github/actions/pnpm
- name: Build
run: pnpm run build
- name: Extract version from commit message
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
VERSION=$(echo "${COMMIT_MESSAGE}" | grep -oP 'release: \Kv[0-9]+\.[0-9]+\.[0-9]+')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Create and push tag
run: |
git tag ${VERSION}
git push origin ${VERSION}
- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
run: npm publish --tag latest --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}