Skip to content

chore: use pnpm (#69) #75

chore: use pnpm (#69)

chore: use pnpm (#69) #75

Workflow file for this run

name: Automatic Publish
on:
push:
branches:
- master
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
check-latest: true
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm && pnpm install
- name: Publish
run: |
if git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+$";
then
pnpm publish --provenance --access public
elif git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+";
then
pnpm publish --tag next --provenance --access public
else
echo "Not a release, skipping publish"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}