-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.34 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
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: release
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set git identity
run: |-
git config user.name "Automation"
git config user.email "[email protected]"
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: release
run: npx projen release
- name: Check for new commits
id: git_remote
run: echo ::set-output name=latest_commit::"$(git ls-remote origin -h ${{
github.ref }} | cut -f1)"
- name: Create release
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }}
run: gh release create v$(cat dist/version.txt) -F dist/changelog.md -t v$(cat
dist/version.txt)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
if: ${{ steps.git_remote.outputs.latest_commit == github.sha }}
uses: actions/[email protected]
with:
name: dist
path: dist
container:
image: jsii/superchain