Skip to content

Commit

Permalink
Publish tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesridgway committed Aug 5, 2023
1 parent 177968d commit 85e800a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/publish_gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ jobs:
- name: Build and publish gem
run: |
gem build caracal.gemspec
gem push --key github --host https://rubygems.pkg.github.com/the-curve-consulting caracal-*.gem
echo "Setting up access to GitHub Package Registry"
mkdir -p ~/.gem
touch ~/.gem/credentials
chmod 600 ~/.gem/credentials
echo ":github: Bearer ${GITHUB_TOKEN}" >> ~/.gem/credentials
echo "Building the gem"
find . -name '*.gemspec' -maxdepth 1 -exec gem build {} \;
echo "Pushing the built gem to GitHub Package Registry"
find . -name '*.gem' -maxdepth 1 -print0 | xargs -0 gem push --key github --host "https://rubygems.pkg.github.com/${OWNER}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: the-curve-consulting

0 comments on commit 85e800a

Please sign in to comment.