32 lines
564 B
YAML
32 lines
564 B
YAML
name: Publish
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
node_version: 22
|
|
|
|
permissions:
|
|
id-token: write
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.node_version }}
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm publish --provenance --access public
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|