-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
using RubyGems Trusted Publishers
- Loading branch information
Showing
4 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,46 @@ | ||
name: Release a New Version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "New Version. major|minor|patch|rc or an explicit version number." | ||
required: true | ||
default: patch | ||
type: string | ||
|
||
permissions: | ||
contents: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
outputs: | ||
new_version: ${{ steps.bump_version.outputs.new_version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: git-actions/set-user@v1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.2 | ||
bundler-cache: true | ||
rubygems: latest | ||
- name: Bump version | ||
id: bump_version | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
bundle config unset deployment | ||
bundle exec gem bump -v ${{ inputs.version }} -m "v%{version}" | ||
bundle install | ||
git add Gemfile.lock Gemfile.ruby-2.6.lock | ||
git commit --amend --no-edit | ||
- uses: rubygems/release-gem@v1 |
This file contains 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 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 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