-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (51 loc) · 1.61 KB
/
publish.yml
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
name: Publish
on:
release:
types: [published]
env:
CI: true
jobs:
release-prod:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Tag
uses: olegtarasov/get-tag@v2.1
id: tagName
with:
tagRegex: '(?<package>.*)_(?<version>.*)'
- name: Set Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'yarn'
- name: Install
run: yarn
- name: Build
run: yarn workspaces foreach -v -R --from ${{ steps.tagName.outputs.package }} run build
- name: Lint
run: |
yarn workspace ${{ steps.tagName.outputs.package }} run lint
- name: Test
run: |
yarn workspace ${{ steps.tagName.outputs.package }} run test
- name: Set Version
run: |
yarn workspace ${{ steps.tagName.outputs.package }} version ${{ steps.tagName.outputs.version }}
# - name: JSII Build (if needed)
# run: |
# yarn workspace ${{ steps.tagName.outputs.package }} run jsii:build
- name: Authenticate with NPM
run: |
yarn config set npmAuthToken ${{ secrets.CDK_NPM_TOKEN }}
- name: Publish to NPM
run: |
yarn workspace ${{ steps.tagName.outputs.package }} npm publish
# - name: Publish to PyPI (if needed)
# env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# yarn workspace ${{ steps.tagName.outputs.package }} run jsii:publish