File tree Expand file tree Collapse file tree 4 files changed +100
-121
lines changed Expand file tree Collapse file tree 4 files changed +100
-121
lines changed Original file line number Diff line number Diff line change 1+ name : Build & package workflow
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ release :
7+ required : false
8+ type : boolean
9+ default : false
10+
11+ jobs :
12+ build_and_package :
13+ name : Build and package
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - uses : actions/setup-node@v3
19+ with :
20+ node-version : 16
21+ cache : " npm"
22+
23+ - name : Install Dependencies
24+ run : npm ci
25+
26+ - name : Compile project
27+ run : npm run build
28+
29+ - name : Generate distribution packages
30+ run : npm run package
31+
32+ - name : Generate documentation
33+ run : npm run docgen
34+
35+ - uses : actions/upload-artifact@v3
36+ with :
37+ name : docs
38+ path : docs
39+
40+ - uses : actions/upload-artifact@v3
41+ with :
42+ name : python
43+ path : dist/python/*
44+
45+ - uses : actions/upload-artifact@v3
46+ with :
47+ name : js
48+ path : dist/js/*
49+
50+ - uses : actions/upload-artifact@v3
51+ with :
52+ name : jsii
53+ path : .jsii
54+
55+ - name : Get Release Bot Token
56+ id : get-token
57+ if : ${{ inputs.release }}
58+ uses : getsentry/action-github-app-token@v1
59+ with :
60+ app_id : ${{ secrets.DS_RELEASE_BOT_ID }}
61+ private_key : ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }}
62+
63+ - name : Maybe Release 🚀
64+ if : ${{ inputs.release }}
65+ run : |
66+ npm run semantic-release
67+ env :
68+ GITHUB_TOKEN : ${{ steps.get-token.outputs.token }}
Original file line number Diff line number Diff line change 77
88jobs :
99 package :
10- runs-on : ubuntu-latest
11- steps :
12- - uses : actions/checkout@v3
13-
14- - uses : actions/setup-node@v3
15- with :
16- node-version : 16
17- cache : " npm"
18-
19- - name : Install Dependencies
20- run : npm ci
21-
22- - name : Compile project
23- run : npm run build
24-
25- - name : Generate distribution packages
26- run : npm run package
27-
28- - name : Generate documentation
29- run : npm run docgen
30-
31- - uses : actions/upload-artifact@v3
32- with :
33- name : docs
34- path : docs
35-
36- - uses : actions/upload-artifact@v3
37- with :
38- name : python
39- path : dist/python/*
40-
41- - uses : actions/upload-artifact@v3
42- with :
43- name : js
44- path : dist/js/*
45-
46- - uses : actions/upload-artifact@v3
47- with :
48- name : jsii
49- path : .jsii
50-
51- update-docs :
52- runs-on : ubuntu-latest
53- needs : package
54- steps :
55- - uses : actions/checkout@v3
56-
57- - uses : actions/download-artifact@v3
58- with :
59- name : docs
60- path : docs
61-
62- - name : Deploy 🚀
63- uses : JamesIves/github-pages-deploy-action@v4
64- with :
65- folder : docs
10+ uses : ./.github/workflows/build.yaml
6611
6712 distribute-python :
6813 runs-on : ubuntu-latest
9338 - uses : actions/setup-node@v3
9439 with :
9540 node-version : 16
96- registry-url : ' https://registry.npmjs.org'
41+ registry-url : " https://registry.npmjs.org"
9742
9843 - run : npm publish dist/*
9944 env :
Original file line number Diff line number Diff line change 1+ name : Build Docs
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ package :
10+ uses : ./.github/workflows/build.yaml
11+
12+ update-docs :
13+ runs-on : ubuntu-latest
14+ needs : package
15+ steps :
16+ - uses : actions/checkout@v3
17+
18+ - uses : actions/download-artifact@v3
19+ with :
20+ name : docs
21+ path : docs
22+
23+ - name : Deploy 🚀
24+ uses : JamesIves/github-pages-deploy-action@v4
25+ with :
26+ folder : docs
Original file line number Diff line number Diff line change 44 push :
55
66jobs :
7- test-build :
8- runs-on : ubuntu-latest
9- steps :
10- # To make git commits made by semantic-release be made to our bot and not
11- # "github-actions" user which doesn't trigger other Action Workflows.
12- # https://github.com/semantic-release/semantic-release/discussions/1906#discussioncomment-656651
13- - name : Checkout
14- uses : actions/checkout@v3
15- with :
16- persist-credentials : false
17-
18- - uses : actions/setup-node@v3
19- with :
20- node-version : 16
21- cache : " npm"
22-
23- - name : Install Dependencies
24- run : npm ci
25-
26- - name : Compile project
27- run : npm run build
28-
29- - name : Generate distribution packages
30- run : npm run package
31-
32- - name : Generate documentation
33- run : npm run docgen
34-
35- - uses : actions/upload-artifact@v3
36- with :
37- name : docs
38- path : |
39- docs
40-
41- - uses : actions/upload-artifact@v3
42- with :
43- name : python
44- path : |
45- dist/python/*
46-
47- - uses : actions/upload-artifact@v3
48- with :
49- name : js
50- path : |
51- dist/js/*
52-
53- - uses : actions/upload-artifact@v3
54- with :
55- name : jsii
56- path : |
57- .jsii
58-
59- - name : Get Release Bot Token
60- id : get-token
61- uses : getsentry/action-github-app-token@v1
62- with :
63- app_id : ${{ secrets.DS_RELEASE_BOT_ID }}
64- private_key : ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }}
65-
66- - name : Maybe Release 🚀
67- run : |
68- npm run semantic-release
69- env :
70- GITHUB_TOKEN : ${{ steps.get-token.outputs.token }}
7+ package :
8+ uses : ./.github/workflows/build.yaml
9+ with :
10+ release : true
You can’t perform that action at this time.
0 commit comments