-
Notifications
You must be signed in to change notification settings - Fork 19
49 lines (38 loc) · 1.25 KB
/
publish-release.yml
File metadata and controls
49 lines (38 loc) · 1.25 KB
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
name: Publish Release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: jungwinter/split@v1
id: split
with:
seperator: "."
msg: ${{ github.event.release.tag_name }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org/
- name: Install app dependencies
run: cd . && npm install
- name: Install lib dependencies
run: cd ./projects/dxc-ngx-cdk && rm -rf node_modules && npm install
- name: Generate lib
run: cd ./projects/dxc-ngx-cdk && npm run generate-lib
- name: Link lib
run: cd . && npm run link-lib
- name: Test library
run: cd ./projects/dxc-ngx-cdk && npm run test
- name: Publish RELEASE to npm
run: |
sed -i "s#\"version\": \"0.0.0\"#\"version\": \"${TAG_NAME}\"#" ./dist/dxc-ngx-cdk/package.json
cd ./dist/dxc-ngx-cdk
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
TAG_NAME: ${{ github.event.release.tag_name }}