Skip to content

Commit f365800

Browse files
committed
ci: add release management with release please
Uses release please to manage the release process. Also adds a PR check workflow to lint the PR title using conventional commits.
1 parent 82a139d commit f365800

4 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
types: [opened, synchronize, reopened, edited]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: read
11+
12+
jobs:
13+
lint-pr-title:
14+
name: Lint PR title (Conventional Commits)
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
jobs:
14+
release-please:
15+
name: Release Please
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Issue GitHub Token
19+
id: issue-github-token
20+
uses: smartcontractkit/.github/actions/setup-github-token@setup-github-token/v1
21+
with:
22+
aws-role-arn: ${{ secrets.GATI_AWS_ROLE_CLD_CHANGESETS }}
23+
aws-lambda-url: ${{ secrets.GATI_LAMBDA_OPERATIONS_PLATFORM_URL }}
24+
aws-region: ${{ secrets.GATI_AWS_REGION }}
25+
26+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
27+
with:
28+
# TODO: create a RELEASE_PLEASE_TOKEN secret with repo + PR scopes,
29+
# or use a GATI Token in order to run CI tests automatically on the PR branch
30+
token: ${{ secrets.GITHUB_TOKEN }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1"
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+
"packages": {
3+
".": {
4+
"release-type": "go",
5+
"package-name": "cld-changesets",
6+
"bump-minor-pre-major": true
7+
}
8+
},
9+
"changelog-sections": [
10+
{ "type": "build", "section": "Builds", "hidden": true },
11+
{ "type": "chore", "section": "Miscellaneous", "hidden": true },
12+
{ "type": "ci", "section": "Continuous Integrations", "hidden": true },
13+
{ "type": "docs", "section": "Documentation", "hidden": true },
14+
{ "type": "feat", "section": "Features" },
15+
{ "type": "fix", "section": "Bug Fixes" },
16+
{ "type": "perf", "section": "Performance Improvements", "bump": "patch" },
17+
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
18+
{ "type": "revert", "section": "Reverts", "bump": "patch" },
19+
{ "type": "style", "section": "Styles", "hidden": true },
20+
{ "type": "test", "section": "Tests", "hidden": true }
21+
]
22+
}

0 commit comments

Comments
 (0)