Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak publish action to only build and push #43

Merged
merged 2 commits into from
May 29, 2024

Conversation

darronschall
Copy link
Contributor

Previously the action was running bundle exec rake release, which was doing too much, and broke after #41 since the release task is meant to be run on a local development machine.

The GitHub publish_gem action automatically runs when a release tag is pushed. The only thing the action should do is build the gem and publish to RubyGems.

Previously the action was running `bundle exec rake release`, which was doing too much.

The GitHub publish_gem action automatically runs when a release tag is pushed. The only thing the action should do is build the gem and publish to RubyGems.
@danielmorrison
Copy link
Member

Does this still use the trusted publisher stuff? This is all getting so confusing.

@darronschall
Copy link
Contributor Author

I don't know the answer to that; I'm not entirely sure how GitHub authenticates to RubyGems as a trusted publisher.

Looking at the rubygem release action, there's an extra rubygems/configure-rubygems-credentials@v1.0.0 in there. That's probably required, I'll add that in.

@darronschall darronschall disabled auto-merge May 29, 2024 16:19
@darronschall darronschall merged commit e9e2b69 into main May 29, 2024
5 checks passed
@darronschall darronschall deleted the tweak-github-publish-action branch May 29, 2024 16:19
@darronschall
Copy link
Contributor Author

In order to get the action to run, I had to do a little bit of cleanup:

Delete the tag that the publish_gem action failed on:

% git tag -d v1.2.0 && git push --delete origin v1.2.0
Deleted tag 'v1.2.0' (was 59273e6)
To github.com:collectiveidea/protoc-gen-twirp_ruby.git
 - [deleted]         v1.2.0

Re-tag the latest after this PR was merged in:

% bundle exec rake release:source_control_push
Tagged v1.2.0.
Pushed git commits and release tag.

The push of the new 1.2.0 tag triggered the publish action to re-run for 1.2.0, which ran successfully and released 1.2.0 to RubyGems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants