-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.47 KB
/
release_upload.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
name: Upload Release
on:
release:
types: [published]
jobs:
# Confirm that build was upload successfully
upload:
uses: teragrep/jsa_01/.github/workflows/coverity_upload.yaml@main
secrets:
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }}
COVERITY_EMAIL: ${{ secrets.COVERITY_EMAIL }}
publish:
#if: github.ref == 'refs/heads/base-feat'
needs: [upload]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
#registry-url: https://registry.npmjs.org/
- name: Set package registry
run: npm config set registry https://npm.pkg.github.com
- name: Github package registry authentication
run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}
- name: Npm registry authentication
run: npm set //registry.npmjs.org/:_authToken ${{secrets.NPMJS_AUTOMATION}}
- name: Update the package json
run: |
sed -i "s|\"version\": \"[^\"]*\"|\"version\": \"${{ github.event.release.tag_name }}\"|" package.json
git config user.email "[email protected]"
git config user.name "spidermanja"
git add .
git commit -am "Updated the tag version ${{ github.event.release.tag_name }}"
git push origin HEAD:main
- name: Publish packages
run: npm publish