-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (43 loc) · 1.23 KB
/
release.yml
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
name: Package Release
on:
push:
branches:
- github-action
jobs:
npm-package:
name: Build and push npm package
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: 5.x
- name: Calculate the build version
id: gitversion
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true
- name: Install and configure Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
run_install: true
- name: Increment package version
run: "npm version ${{ steps.gitversion.outputs.semver }} -m 'chore: Bump package version'"
- name: Build
run: pnpm build
- name: Package
run: pnpm package
- name: Publish
run: npm publish --dry-run --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}