-
-
Notifications
You must be signed in to change notification settings - Fork 751
37 lines (28 loc) · 931 Bytes
/
publish-beta.yml
File metadata and controls
37 lines (28 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish to npm
on:
release:
types: [published]
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.release.prerelease || contains(github.event.release.tag_name, 'alpha') || contains(github.event.release.tag_name, 'beta') || contains(github.event.release.tag_name, 'rc') }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.release.target_commitish }}
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
- run: npm install -g npm@latest
- run: npm ci
- name: Set package version
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
npm version "$VERSION" --no-git-tag-version
- name: Publish to npm
run: npm publish --provenance --tag beta