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

(bug) - Remove third party rubygems registry dependency #69

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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