-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 1.6 KB
/
npm-publish.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: NPM Publish
on:
push:
branches:
- master
- main
jobs:
release_build:
name: Release Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- id: setup
uses: ./.github/actions/setup_workspace
- run: pnpm type-check
- run: pnpm test
- run: pnpm build
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist
release_publish:
name: Release Publish
needs: release_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- id: setup
uses: ./.github/actions/setup_workspace
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: ls -l
- run: ls -l dist/
- name: Semantic Release
id: semantic_release
uses: cycjimmy/semantic-release-action@v3
with: # You can specify specifying version range for the extra plugins if you prefer.
extra_plugins: |
@semantic-release/git
@semantic-release/github
conventional-changelog-conventionalcommits
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- id: publish
if: steps.semantic_release.outputs.new_release_published == 'true'
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./dist/package.json