Skip to content

Commit

Permalink
Add release workflow using Trusted publishing
Browse files Browse the repository at this point in the history
Releasing is done now by publishing a new release on GitHub.
  • Loading branch information
rafaelfranca committed Sep 4, 2024
1 parent 6c924e2 commit c5ca9d5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types: [published]

jobs:
release:
permissions:
contents: write
id-token: write

environment: release

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 3.3.4
- name: Configure trusted publishing credentials
uses: rubygems/[email protected]
- name: Run release rake task
run: bundle exec rake release
shell: bash
- name: Wait for release to propagate
run: gem exec rubygems-await pkg/*.gem
shell: bash
3 changes: 0 additions & 3 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ git commit -m "Bump version for $VERSION"
git push
git tag v$VERSION
git push --tags
gem build propshaft.gemspec
gem push "propshaft-$VERSION.gem" --host https://rubygems.org
rm "propshaft-$VERSION.gem"

0 comments on commit c5ca9d5

Please sign in to comment.