-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate the release of gem versions
- Loading branch information
1 parent
42b2136
commit fe7ca90
Showing
1 changed file
with
38 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,38 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
steps: | ||
# Set up | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: ruby | ||
|
||
- name: Setup Signed Committer | ||
run: git config --global user.signingkey ${{ secrets.GPG_KEY }} | ||
- name: Setup GPG | ||
run: echo "${{ secrets.GPG_KEY }}" | base64 --decode | gpg --import | ||
- name: Setup Git | ||
run: git config --global user.email "${{ secrets.GIT_EMAIL }}" && git config --global user.name "${{ secrets.GIT_NAME }}" | ||
|
||
# Release | ||
- uses: rubygems/release-gem@v1 | ||
|
||
- name: Push changes with the version bump | ||
run: | | ||
git push origin main | ||
git push origin --tags |