-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (31 loc) · 988 Bytes
/
Copy pathpublish.yml
File metadata and controls
41 lines (31 loc) · 988 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
38
39
40
41
name: publish
on:
push:
tags: ["v*"]
jobs:
publish:
runs-on: ubuntu-latest
name: Publish to npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version-file: .nvmrc
cache: npm
registry-url: https://registry.npmjs.org
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Set version from tag
env:
TAG_NAME: ${{ github.ref_name }}
run: npm version "${TAG_NAME#v}" --no-git-tag-version --allow-same-version
- name: Build
run: npm run build
- name: Publish
run: npm publish --access public