File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Automatic Publish
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ tags-ignore :
7
+ - ' **'
8
+ paths-ignore :
9
+ - ' **/*.md'
10
+ - LICENSE
11
+ - ' **/*.gitignore'
12
+ - .editorconfig
13
+ - docs/**
14
+ pull_request : null
15
+ jobs :
16
+ publish :
17
+ name : Publish
18
+ runs-on : ubuntu-latest
19
+ permissions :
20
+ contents : read
21
+ id-token : write
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ - uses : pnpm/action-setup@v4
25
+ - uses : actions/setup-node@v4
26
+ with :
27
+ node-version-file : ' .node-version'
28
+ check-latest : true
29
+ cache : ' pnpm'
30
+ registry-url : ' https://registry.npmjs.org'
31
+ - run : npm install -g npm
32
+ - run : pnpm install
33
+ - run : pnpm run build
34
+ - run : pnpm run lint
35
+ - name : Publish
36
+ run : |
37
+ if git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+$";
38
+ then
39
+ pnpm -r publish --provenance --access public
40
+ elif git log -1 --pretty=%B | grep "^release: [0-9]\+\.[0-9]\+\.[0-9]\+";
41
+ then
42
+ pnpm -r publish --provenance --access public --tag next
43
+ else
44
+ echo "Not a release, skipping publish"
45
+ fi
46
+ env :
47
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
48
+ NPM_CONFIG_PROVENANCE : true
Original file line number Diff line number Diff line change
1
+ 22
You can’t perform that action at this time.
0 commit comments