Skip to content

Commit dd4d815

Browse files
committed
feat: add release please action to automate releases (#2497) (#2498)
1 parent a8e6598 commit dd4d815

File tree

5 files changed

+67
-7
lines changed

5 files changed

+67
-7
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
id: release
18+
with:
19+
config-file: release-please-config.json
20+
# this assumes that you have created a personal access token
21+
# (PAT) and configured it as a GitHub action secret named
22+
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
23+
token: ${{ secrets.HCA_RELEASE_PLEASE_TOKEN }}
24+
# This is a built-in strategy in release-please, see "Action Inputs" for more options

.github/workflows/run-checks.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,22 @@ jobs:
55
build:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
9-
- uses: actions/setup-node@v2
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-node@v4
1010
with:
1111
node-version: "20.10.0"
12-
- run: |
13-
npm ci
14-
npm run check-format
15-
npm run lint
16-
npx tsc --noEmit
12+
- name: Cache npm cache
13+
uses: actions/cache@v4
14+
with:
15+
path: ~/.npm
16+
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
17+
- name: Install dependencies
18+
run: npm ci
19+
- name: Next.js Build
20+
run: npm run build-prod:data-portal
21+
- name: Run Prettier
22+
run: npm run check-format
23+
- name: Run Linter (ESLint)
24+
run: npm run lint
25+
- name: Type Check
26+
run: npx tsc --noEmit

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# general
22
README.md
3+
CHANGELOG.md
34

45
# testing
56
coverage

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "2.0.0"
3+
}

release-please-config.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"monorepo-tags": false,
3+
"packages": {
4+
".": {
5+
"release-type": "node",
6+
"component": "",
7+
"include-component-in-tag": false
8+
}
9+
},
10+
"changelog-sections": [
11+
{ "type": "feat", "section": "Features" },
12+
{ "type": "fix", "section": "Bug Fixes" },
13+
{ "type": "chore", "section": "Chores" },
14+
{ "type": "docs", "section": "Documentation" },
15+
{ "type": "style", "section": "Styles" },
16+
{ "type": "refactor", "section": "Code Refactoring" },
17+
{ "type": "perf", "section": "Performance Improvements" },
18+
{ "type": "test", "section": "Tests" },
19+
{ "type": "build", "section": "Build System" },
20+
{ "type": "ci", "section": "Continuous Integration" }
21+
]
22+
}

0 commit comments

Comments
 (0)