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 6f7448b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/gem_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Create release"
- name: "Create GitHub release"
run: |
gh release create v${{ steps.get_version.outputs.version }} ./pkg/*.gem --title v${{ steps.get_version.outputs.version }} -F OUTPUT.md
env:
Expand All @@ -68,8 +68,16 @@ jobs:
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'
- 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 ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
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 6f7448b

Please sign in to comment.