-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (70 loc) · 2.63 KB
/
release-please.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
on:
push:
branches:
- master
name: release-please-pr
jobs:
release-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: google-github-actions/release-please-action@v3
id: release-please
with:
release-type: node
package-name: '@appfolio/react-gears'
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":false},{"type":"refactor","section":"Miscellaneous","hidden":false}]'
command: release-pr
- uses: actions/github-script@v5
if: ${{ steps.release-please.outputs.pr }}
id: extract-branch
env:
PR_NUM: ${{ steps.release-please.outputs.pr }}
with:
result-encoding: string
script: return JSON.parse(process.env.PR_NUM).headBranchName
- uses: actions/checkout@v2
if: ${{ steps.release-please.outputs.pr }}
with:
ref: ${{ steps.extract-branch.outputs.result }}
- run: yarn install --immutable
if: ${{ steps.release-please.outputs.pr }}
- run: yarn docs
if: ${{ steps.release-please.outputs.pr }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ steps.release-please.outputs.pr }}
with:
commit_message: 'docs: update documentation for the latest release'
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: '@appfolio/react-gears'
command: github-release
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
with:
node-version: 16
if: ${{ steps.release.outputs.release_created }}
- run: yarn install --immutable
if: ${{ steps.release.outputs.release_created }}
- run: yarn dist
if: ${{ steps.release.outputs.release_created }}
- name: Publish to GitHub
run: |
npm config set registry https://npm.pkg.github.com
npm config set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
npm publish
if: ${{ steps.release.outputs.release_created }}
- name: Publish to npm
run: |
npm config set registry https://registry.npmjs.org
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm publish --access public
if: ${{ steps.release.outputs.release_created }}