-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (80 loc) · 2.19 KB
/
release.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: Release
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Synthesize project files
run: npx projen
- name: Anti-tamper check
run: git diff --exit-code
- name: Set git identity
run: |-
git config user.name "Auto-bump"
git config user.email "[email protected]"
- name: Bump to next version
run: npx projen bump
- name: Build
run: npx projen build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
directory: coverage
- name: Anti-tamper check
run: git diff --exit-code
- name: Push changes
run: git push --follow-tags origin $BRANCH
env:
BRANCH: ${{ github.ref }}
- name: Upload artifact
uses: actions/[email protected]
with:
name: dist
path: dist
container:
image: jsii/superchain
release_npm:
name: Release to NPM
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Release
run: npx -p jsii-release@latest jsii-release-npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_DIST_TAG: latest
NPM_REGISTRY: registry.npmjs.org
release_pypi:
name: Release to PyPi
needs: build
runs-on: ubuntu-latest
container:
image: jsii/superchain
steps:
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Release
run: npx -p jsii-release@latest jsii-release-pypi
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}