build: semi-automated release process#80
Conversation
Up to standards ✅🟢 Issues
|
f94b6a6 to
e19047f
Compare
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
There was a problem hiding this comment.
the release process looks very promising. 👍
Release documentation will be added in a follow-up PR.
Docs shall happen when changes happen.
Could you please add some docs how this all works and how it is triggered?
This might go here: CONTRIBUTING.md section "To release a new version".
You might want to remove the "Manual process" and add a "Semi-Automated process" or whatever sounds appropriate
please also add a description of the build changes to CHANGELOG.md
| needs: rubygems_release | ||
| environment: release | ||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
please add a comment why this permission is needed
There was a problem hiding this comment.
Addressed in e3c2541. Thanks for the suggestion.
| timeout-minutes: 10 | ||
| needs: test | ||
| permissions: | ||
| contents: write |
There was a problem hiding this comment.
please add comments why the permissions are needed
There was a problem hiding this comment.
Addressed in 51b50f1. Thanks for the suggestion.
| persist-credentials: false | ||
| - name: Create GitHub Release | ||
| run: | | ||
| gh release create "${{ github.ref_name }}" \ |
There was a problem hiding this comment.
| gh release create "${{ github.ref_name }}" \ | |
| gh release create "$GITHUB_REF_NAME" \ |
see
There was a problem hiding this comment.
Addressed in 2106cb1. Thanks for the suggestion.
| with: | ||
| persist-credentials: false | ||
| - name: Create GitHub Release | ||
| run: | |
There was a problem hiding this comment.
please rework this to
run: >
gh release create ...
--verify-tag
...| ruby-version: ruby | ||
| bundler-cache: false | ||
| - name: "Push gem to RubyGems" | ||
| uses: rubygems/release-gem@6317d8d1f7e28c24d28f6eff169ea854948bd9f7 # v1.2.0 |
There was a problem hiding this comment.
please add a comment with the action's URL for easier docks lookup when maintaining.
There was a problem hiding this comment.
Addressed in da61dd3. Thanks for the suggestion.
| run: | | ||
| gh release create "${{ github.ref_name }}" \ | ||
| --verify-tag \ | ||
| --generate-notes |
There was a problem hiding this comment.
I'd love to see the "--prerelease" marker in case the tag looks like one.
This will be especially needed to test the release process before merging the PR.
Possible way to do this: similar to https://github.com/CycloneDX/cyclonedx-buildroot/blob/main/.github/workflows/release.yml
- add a new job that determines whether this is a prerelease
- do a pattern-math on the version string
- set an output parameter properly
- have the release process depend on the newly added job
- when creating the GH release: reflect on the outcome and flag as prerelease if needed
|
|
||
| on: | ||
| push: | ||
| tags: ["v*"] |
There was a problem hiding this comment.
maybe better go with
| tags: ["v*"] | |
| tags: ["v*.*.*"] |
There was a problem hiding this comment.
Addressed in 3e9e0ba. Thanks for the suggestion.
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Create GitHub Release |
There was a problem hiding this comment.
could the release have the gem as a release asset?
It would be ideal to use the one produced in the rubygems_release job - you could use https://docs.github.com/en/actions/concepts/workflows-and-actions/workflow-artifacts to transfer a file from one job to the other. (artifact lifetime of 1 day should be enough)
There was a problem hiding this comment.
Would you be okay with deferring this for now? I don't think it's necessary to include the built gem in the GitHub release since it'll already be published to RubyGems, and anyone can build it from the release assets. AFAIK, rubygems/release-gem does not produce a build artifact, so we'd need to add additional steps to build the gem and upload it separately.
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Signed-off-by: Amauri Bizerra <10775696+extern-c@users.noreply.github.com>
Description
Add a release workflow for RubyGems and GitHub Releases triggered by version tags (
v*).This PR resolves issue: #46.
The workflow consists of three jobs:
The GitHub Release does not include a built gem package and is intended only for release metadata and assets.
Future Improvements
To keep this change focused, a few related enhancements are left for follow-up work:
Release documentation will be added in a follow-up PR.
Testing
The workflow has been validated to the extent possible, but I was unable to perform an end-to-end test for the RubyGems publishing step because trusted publishing requires maintainer-controlled RubyGems and repository configuration.
A maintainer will need to:
releaseenvironment if one does not already exist.AI Tool Disclosure
[e.g. GitHub CoPilot, ChatGPT, JetBrains Junie etc.][e.g. GPT-4.1, Claude Haiku 4.5, Gemini 2.5 Pro etc.][Summarize the key prompts or instructions given to the AI tools]Affirmation