File tree 1 file changed +19
-14
lines changed
1 file changed +19
-14
lines changed Original file line number Diff line number Diff line change 3
3
push :
4
4
branches :
5
5
- main
6
- tags : v*
6
+ tags :
7
+ - " v*"
7
8
8
9
jobs :
9
10
build :
18
19
steps :
19
20
- name : Checkout
20
21
uses : actions/checkout@v2
22
+ with :
23
+ fetch-depth : 0
21
24
- name : APT Install
22
25
run : |
23
26
sudo apt-get install \
@@ -35,20 +38,22 @@ jobs:
35
38
- name : NPM Install
36
39
run : npm ci
37
40
- name : Build and Test
38
- run : npm run build-and-test
39
- - name : Release
40
- if : github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
41
- run : npm run release
42
- - name : GitHub Release
43
- if : github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
44
- uses : ncipollo/release-action@v1
45
- with :
46
- artifacts : dist/layer.zip
47
- token : ${{ secrets.GITHUB_TOKEN }}
41
+ run : npm run build && npm run package
42
+ # - name: Release
43
+ # if: startsWith(github.ref, 'refs/tags/v')
44
+ # run: npm run release
45
+ # - name: GitHub Release
46
+ # if: startsWith(github.ref, 'refs/tags/v')
47
+ # uses: ncipollo/release-action@v1
48
+ # with:
49
+ # artifacts: dist/layer.zip
50
+ # token: ${{ secrets.GITHUB_TOKEN }}
48
51
- name : NPM Publish
49
- if : github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
52
+ if : startsWith(github.ref, 'refs/tags/v')
50
53
env :
51
54
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
52
55
run : |
53
- npm version from-git
54
- npm publish --registry=https://registry.npmjs.org
56
+ echo "$(git describe --tags --abbrev=0)"
57
+ npm --no-git-tag-version version "$(git describe --tags --abbrev=0)"
58
+ npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
59
+ npm publish
You can’t perform that action at this time.
0 commit comments