2022-03-28 16:13:04 +03:00
|
|
|
name: Publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
2024-10-23 01:18:05 +03:00
|
|
|
permissions:
|
2024-10-23 18:36:50 +03:00
|
|
|
contents: read
|
2024-10-23 01:18:05 +03:00
|
|
|
id-token: write
|
|
|
|
|
2022-03-28 16:13:04 +03:00
|
|
|
jobs:
|
|
|
|
publish-npm:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-10-23 01:13:02 +03:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
2022-03-28 16:13:04 +03:00
|
|
|
with:
|
2024-10-23 01:13:02 +03:00
|
|
|
node-version: 22
|
2022-03-28 16:13:04 +03:00
|
|
|
registry-url: https://registry.npmjs.org/
|
|
|
|
cache: npm
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm test
|
|
|
|
- run: npm version ${TAG_NAME} --git-tag-version=false
|
|
|
|
env:
|
|
|
|
TAG_NAME: ${{ github.event.release.tag_name }}
|
2024-10-23 01:13:02 +03:00
|
|
|
- run: npm whoami; npm --ignore-scripts publish --provenance
|
2022-03-28 16:13:04 +03:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|