-
Notifications
You must be signed in to change notification settings - Fork 4
73 lines (60 loc) · 1.59 KB
/
build.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build & package workflow
on:
workflow_call:
inputs:
release:
required: false
type: boolean
default: false
secrets:
DS_RELEASE_BOT_ID:
required: false
DS_RELEASE_BOT_PRIVATE_KEY:
required: false
jobs:
build_and_package:
name: Build and package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Compile project
run: npm run build
- name: Generate distribution packages
run: npm run package
- name: Generate documentation
run: npm run docgen
- uses: actions/upload-artifact@v3
with:
name: docs
path: docs
- uses: actions/upload-artifact@v3
with:
name: python
path: dist/python/*
- uses: actions/upload-artifact@v3
with:
name: js
path: dist/js/*
- uses: actions/upload-artifact@v3
with:
name: jsii
path: .jsii
- name: Get Release Bot Token
id: get-token
if: ${{ inputs.release }}
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.DS_RELEASE_BOT_ID }}
private_key: ${{ secrets.DS_RELEASE_BOT_PRIVATE_KEY }}
- name: Maybe Release 🚀
if: "${{ inputs.release }}"
run: |
npm run semantic-release
env:
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}