Skip to content

Remove provenance flag (#101) #20

Remove provenance flag (#101)

Remove provenance flag (#101) #20

Workflow file for this run

name: Publish to NPM
on:
push:
branches:
- main # Only run on pushes to the main branch
tags:
- '*.*.*' # Stable releases
- '*-alpha.*' # Alpha releases
- '*-beta.*' # Beta releases
- '*-canary.*' # Canary releases
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.x
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Debug Git status
run: git status --porcelain
- name: Run tests
run: pnpm test:ci
- name: Lint code
run: pnpm lint
- name: Build project
run: pnpm run build
- name: Publish package to NPM
run: |
if [[ "${{ github.ref_name }}" == *-alpha* ]]; then
pnpm publish --access public --tag alpha
elif [[ "${{ github.ref_name }}" == *-beta* ]]; then
pnpm publish --access public --tag beta
elif [[ "${{ github.ref_name }}" == *-canary* ]]; then
pnpm publish --access public --tag canary
else
pnpm publish --access public
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}