Skip to content

Commit f0be4fb

Browse files
committed
chore: use release-please
1 parent 94d8685 commit f0be4fb

File tree

2 files changed

+83
-0
lines changed

2 files changed

+83
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches:
4+
- 5.x
5+
name: release-please-5.x
6+
env:
7+
NODE_VERSION: 18
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: google-github-actions/release-please-action@v3
13+
id: release
14+
with:
15+
release-type: node
16+
package-name: react-docgen
17+
default-branch: 5.x
18+
19+
- name: Checkout
20+
if: ${{ steps.release.outputs.release_created }}
21+
uses: actions/checkout@v3
22+
23+
- name: Setup Node.js
24+
if: ${{ steps.release.outputs.release_created }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ env.NODE_VERSION }}
28+
cache: 'yarn'
29+
30+
- name: Install dependencies
31+
if: ${{ steps.release.outputs.release_created }}
32+
run: yarn install --frozen-lockfile --non-interactive
33+
34+
- name: Install website dependencies
35+
if: ${{ steps.release.outputs.release_created }}
36+
run: yarn install --frozen-lockfile --non-interactive
37+
working-directory: ./website
38+
39+
- run: npm publish
40+
env:
41+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42+
if: ${{ steps.release.outputs.release_created }}

.github/workflows/release-please.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release-please
6+
env:
7+
NODE_VERSION: 18
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: google-github-actions/release-please-action@v3
13+
id: release
14+
with:
15+
release-type: node
16+
package-name: react-docgen
17+
18+
- name: Checkout
19+
if: ${{ steps.release.outputs.release_created }}
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Node.js
23+
if: ${{ steps.release.outputs.release_created }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: 'yarn'
28+
29+
- name: Install dependencies
30+
if: ${{ steps.release.outputs.release_created }}
31+
run: yarn install --frozen-lockfile --non-interactive
32+
33+
- name: Install website dependencies
34+
if: ${{ steps.release.outputs.release_created }}
35+
run: yarn install --frozen-lockfile --non-interactive
36+
working-directory: ./website
37+
38+
- run: npm publish --tag=next
39+
env:
40+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
41+
if: ${{ steps.release.outputs.release_created }}

0 commit comments

Comments
 (0)