Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryancyq/bundle-release-gem
release ruby gem using bundler
https://github.com/ryancyq/bundle-release-gem
cicd github-action github-actions release-automation ruby rubygem rubygems
Last synced: about 1 month ago
JSON representation
release ruby gem using bundler
- Host: GitHub
- URL: https://github.com/ryancyq/bundle-release-gem
- Owner: ryancyq
- License: mit
- Created: 2024-07-13T12:55:40.000Z (7 months ago)
- Default Branch: v1
- Last Pushed: 2024-07-16T15:58:22.000Z (6 months ago)
- Last Synced: 2024-10-31T00:06:08.877Z (3 months ago)
- Topics: cicd, github-action, github-actions, release-automation, ruby, rubygem, rubygems
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bundle and Release Gem GitHub Action
This action allows you to release ruby gem via [rubygems/release-gem] with an out of date branch.
## Scenario
Given the scenario in the continous integration environment, you may want to release a new version of the gem after passing the test suite.
The following events occurred in sequence:
1. git commit triggers release workflow.
2. workflow runs test suite + releas gem action.
3. another git commit pushed to the same remote branch.
4. release gem action from point 2 executed.
5. failed to due `git push` release tag together with `git push` current HEAD to remote.Currently, [rubygems/release-gem@v1] is unable to support the scenario above as described in the [bundler issue] and [rubygem release action issue].
## Workaround
To workaround the limitation, this action will create temporary branch (`releases/vX.X.X`) in the remote.
Then trigger [rubygems/release-gem] to allow `rake release` to push release tag and current HEAD to remote.
Temporary branch will be deleted from remote as part of the cleanup step in the action.## Usage
```yaml
# .github/workflows/release.yml
jobs:
rubygems:
runs-on: ubuntu-latestpermissions:
id-token: write # mandatory for trusted publishing
contents: write # mandatory for pushing the release branch/tag on gitsteps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby- uses: ryancyq/bundle-release-gem@v1
with:
git-remote: "origin" # default to "origin"
git-release-branch-prefix: "releases" # default to "releases"
release-await: false # default to false, rubygems/release-gem "await-release" option
release-trusted: true # default to true, rubygems/release-gem "setup-trusted-publisher" option
```### Compatabality with [rubygems/release-gem]
- All inputs in [rubygems/release-gem] are supported:
- `await-release`
- `setup-trusted-publisher`
- `git-remote` will not be propagated to [rubygems/release-gem] as it is not supported.[rubygems/release-gem]: https://github.com/rubygems/release-gem/
[rubygems/release-gem@v1]: https://github.com/rubygems/release-gem/tree/v1
[bundler issue]: https://github.com/rubygems/rubygems/issues/7818
[rubygem release action issue]: https://github.com/rubygems/release-gem/issues/8