-
Notifications
You must be signed in to change notification settings - Fork 37
53 lines (53 loc) · 1.4 KB
/
publish-to-npm.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
name: dpc-sdp/ripple/publish-to-npm
on:
push:
branches:
# Uncomment below once testing has been completed and we are ready to publish using this workflow
#- master
- 'github-action/disable-workflow'
jobs:
build:
uses: ./.github/workflows/build.yml
test:
needs:
- build
uses: ./.github/workflows/test.yml
confirm-release:
environment:
name: approval
runs-on: ubuntu-latest
needs:
- test
steps:
- run: echo 'approved'
create-release:
needs:
- confirm-release
uses: ./.github/workflows/create-release.yml
tag-release:
needs:
- create-release
permissions:
contents: write
uses: ./.github/workflows/tag-release.yml
create-release-notes:
runs-on: ubuntu-latest
needs:
- tag-release
permissions:
contents: write
steps:
- uses: actions/[email protected]
- name: Restore cache
uses: actions/[email protected]
with:
key: v10-deps-${{ hashFiles('yarn.lock') }}
path: |
./.cache
**/node_modules
- name: Install github-release-notes package
run: yarn add -D -W github-release-notes
- name: Generate release notes and publish to GitHub
run: |-
PACKAGE_VERSION=$(node -pe "require('./lerna.json')['version']")
npx gren release --data-source=commits --tags=v$PACKAGE_VERSION --override --token ${{ secrets.GITHUB_TOKEN }}