-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 930 Bytes
/
publish.yaml
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
name: Publish
on:
workflow_dispatch:
inputs:
version:
description: "Version"
required: true
default: "1.x.x"
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm version ${{ github.event.inputs.version }}
npm ci
npm run build
(cd ./demo && npm install)
npm publish
git commit --amend -am "Release version ${{ github.event.inputs.version }}"
git push origin
git push origin "v${{ github.event.inputs.version }}"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}