-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.41 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
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: Release
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
env:
CI: "true"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10.17.0
- run: yarn install --frozen-lockfile
- run: yarn 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 "github-actions@github.com"
- run: yarn run bump
- run: yarn run build
- name: Anti-tamper check
run: git diff --exit-code
- run: git push --follow-tags origin $GITHUB_REF
- name: Upload artifact
uses: actions/upload-artifact@v2.1.1
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@v1
with:
name: dist
- name: Release
run: npx -p jsii-release jsii-release-npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_DIST_TAG: latest
NPM_REGISTRY: registry.npmjs.org