-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.5 KB
/
release.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Publish package to registry
on:
release:
types:
- released
jobs:
publish:
runs-on: ubuntu-latest
steps:
#
# Checkout repository
#
- name: Checkout
uses: actions/checkout@v4
#
# Setup Node.js
#
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
#
# Setup PNPM package manager
#
- name: Setup package manager
uses: pnpm/action-setup@v4
with:
version: 9
#
# Install all dependencies
#
- name: Install dependencies
run: pnpm install --frozen-lockfile
#
# Configure git user email
#
- name: Configure git user email
run: git config --global user.email "${{ github.event.release.author.email }}"
#
# Configure git user name
#
- name: Configure git user name
run: git config --global user.name "${{ github.event.release.author.login }}"
#
# Change package version
#
- name: Change package version
run: pnpm version ${{ github.event.release.tag_name }}
#
# Build source
#
- name: Build package and bundle source
run: pnpm build
#
# Publish package to destination registry
#
- name: Publish package to registry
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}