Skip to content

Commit

Permalink
ci: configure release-please
Browse files Browse the repository at this point in the history
Configure release please to release inital development versions as
0.y.z.

Signed-off-by: Francesco Canovai <[email protected]>
  • Loading branch information
fcanovai committed Jul 3, 2024
1 parent 2ad7cc7 commit f7fdd88
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,32 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
# TODO: googleapis/release-please-action cannot sign commits yet.
# We'll use the cli until there's a fix for
# https://github.com/googleapis/release-please/issues/2280.
- uses: actions/setup-node@v4
with:
release-type: go
token: ${{ secrets.REPO_PAT }}
node-version: 20
# TODO: remove bump-minor-pre-major when in production. It prevents
# release-please from bumping the major version on breaking changes.
# TODO: remove release-as after first release. Used to set the first
# release version, which would default to 1.0.0. Set the version
# manually also for 1.0.0.
- run: |
npx release-please release-pr \
--token="${{ secrets.GITHUB_TOKEN }}" \
--repo-url="${{ github.repository }}" \
--bump-minor-pre-major=true \
--release-as=0.1.0 \
--signoff "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>";
npx release-please github-release \
--token="${{ secrets.GITHUB_TOKEN }}" \
--repo-url="${{ github.repository }}" \
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"changelog-path": "CHANGELOG.md",
"release-type": "go",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

0 comments on commit f7fdd88

Please sign in to comment.