forked from sporkmonger/addressable
-
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.
Part of sporkmonger#527
- Loading branch information
Showing
2 changed files
with
43 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,32 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- addressable-* | ||
|
||
jobs: | ||
release: | ||
if: github.repository == 'sporkmonger/addressable' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # for trusted publishing | ||
steps: | ||
# tags are named addressable-VERSION, e.g. addressable-2.8.6 | ||
- name: Set VERSION from git tag | ||
run: echo "VERSION=$(echo ${{ github.ref }} | cut -d - -f 2)" >> "$GITHUB_ENV" | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: ruby | ||
|
||
- uses: rubygems/[email protected] | ||
|
||
# build gem | ||
- run: bundle exec rake gem:release | ||
|
||
# push gem to rubygems.org | ||
- run: gem push --verbose pkg/addressable-${VERSION}.gem |
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,11 @@ | ||
# Releasing Addressable | ||
|
||
1. Update `CHANGELOG.md` | ||
1. Update `lib/addressable/version.rb` with the new version | ||
1. Run `rake gem:gemspec` to update gemspec | ||
1. Create pull request with all that | ||
1. Merge the pull request when CI is green | ||
1. Ensure you have latest changes locally | ||
1. Run `rake git:tag:create` to create tag in git | ||
1. Push tag to upstream: `git push --tags upstream` | ||
1. Watch GitHub Actions build and push the gem to RubyGems.org |