Repository navigation
ci: Configure release please #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6cf7015
ci: configure release-please
patch0 fe6ab02
ci: dispatch CI on the release PR branch
patch0 800f3e3
docs: clarify release process in README
patch0 dd938df
Update CHANGELOG for release management details
patch0 fa00f2b
docs: keep the README installation example version up to date
patch0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: PR title | ||
|
|
||
| # release-please builds the changelog and picks the next version from | ||
| # Conventional Commit messages, so PR titles (which become the squash-merge | ||
| # commit message) must follow https://www.conventionalcommits.org/ | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - reopened | ||
| - synchronize | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| conventional-title: | ||
| name: Conventional PR title | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v6 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Release Please | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| release-please: | ||
| name: Release Please | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| outputs: | ||
| release_created: ${{ steps.release.outputs.release_created }} | ||
| tag_name: ${{ steps.release.outputs.tag_name }} | ||
| pr_branch: ${{ steps.release.outputs.pr && fromJSON(steps.release.outputs.pr).headBranchName || '' }} | ||
| steps: | ||
| - uses: googleapis/release-please-action@v5 | ||
| id: release | ||
|
|
||
| # release-please bumps lib/rpi_auth/version.rb but does not fully update the | ||
| # lockfiles (it misses the CHECKSUMS entry and the Appraisal gemfiles), which | ||
| # makes `bundle install` fail in frozen mode. Re-lock them on the release PR. | ||
| update-lockfiles: | ||
| name: Update lockfiles on release PR | ||
| needs: release-please | ||
| if: needs.release-please.outputs.pr_branch != '' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| actions: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ needs.release-please.outputs.pr_branch }} | ||
|
|
||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
|
|
||
| - name: Re-lock gemfiles | ||
| run: | | ||
| bundle lock | ||
| for gemfile in gemfiles/*.gemfile; do | ||
| BUNDLE_GEMFILE="${gemfile}" bundle lock | ||
| done | ||
|
|
||
| - name: Commit and push lockfiles | ||
| run: | | ||
| if git diff --quiet -- Gemfile.lock gemfiles/; then | ||
| echo "Lockfiles already up to date" | ||
| exit 0 | ||
| fi | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add Gemfile.lock gemfiles/*.gemfile.lock | ||
| git commit -m "chore: update lockfiles for release" | ||
| git push | ||
|
|
||
| # Pushes made with GITHUB_TOKEN don't trigger CI, so the required status | ||
| # checks would never report on the release PR. Dispatch CI explicitly so | ||
| # it runs against the final head commit of the release branch. | ||
| - name: Run CI on release PR | ||
| run: gh workflow run ci.yml --repo "${{ github.repository }}" --ref "${BRANCH}" | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| BRANCH: ${{ needs.release-please.outputs.pr_branch }} | ||
|
|
||
| build_publish: | ||
| name: Build and publish | ||
| needs: release-please | ||
| if: needs.release-please.outputs.release_created == 'true' | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| uses: ./.github/workflows/build_publish.yml | ||
| with: | ||
| ref: ${{ needs.release-please.outputs.tag_name }} | ||
| publish: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "4.5.0" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", | ||
| "include-component-in-tag": false, | ||
| "include-v-in-tag": true, | ||
| "packages": { | ||
| ".": { | ||
| "release-type": "ruby", | ||
| "package-name": "rpi_auth", | ||
| "version-file": "lib/rpi_auth/version.rb", | ||
| "changelog-path": "CHANGELOG.md" | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.