Skip to content

Commit

Permalink
(bug) - Remove third party rubygems registry dependency
Browse files Browse the repository at this point in the history
Prior to this commit, we relied on actionshub/publish-gem-to-github.
This action would swallow exit codes, and falsely report successful
steps on non-zero exit code.

We have decided to take a manual approach, where we can essentially do
this ourselves and ensure the maintenace of this step.
  • Loading branch information
jordanbreen28 committed Dec 5, 2023
1 parent 80fa8df commit bce80a6
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions .github/workflows/gem_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,28 +48,17 @@ jobs:
run: |
bundle exec rake build
- name: "Generate release notes"
run: |
export GH_HOST=github.com
gh extension install chelnak/gh-changelog
gh changelog get --latest > OUTPUT.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Create release"
run: |
gh release create v${{ steps.get_version.outputs.version }} ./pkg/*.gem --title v${{ steps.get_version.outputs.version }} -F OUTPUT.md
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to GitHub Package
run : |
echo "Setting up access to RubyGems"
mkdir -p ~/.gem
touch ~/.gem/credentials
chmod 600 ~/.gem/credentials
echo "Logging in to GitHub Package Registry"
echo "---" > ~/.gem/credentials
echo ":github: Bearer dsadsadsadawdewqfdqxaa" | tee -a ~/.gem/credentials
cat ~/.gem/credentials
- name: "Publish gem to rubygems"
run: |
gem push ./pkg/*.gem
env:
GEM_HOST_API_KEY: '${{ secrets.GEM_HOST_API_KEY }}'

- name: Build and publish to GitHub Package
uses: actionshub/publish-gem-to-github@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: 'puppetlabs'
# echo "Pushing gem to GitHub Package Registry"
# gem push --key "github" --host "https://rubygems.pkg.github.com/${{github.repository_owner}}" ./pkg/*.gem

0 comments on commit bce80a6

Please sign in to comment.