Skip to content

Commit

Permalink
fix release action
Browse files Browse the repository at this point in the history
private actions aren't available on public repos
make ksr release use GitHub actions
move old release to release:manual
  • Loading branch information
amancevice committed Jan 8, 2024
1 parent 4dc598f commit 72c93a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
- uses: kickstarter/actions/setup-rubygems@main
with:
api-key: ${{ secrets.RUBYGEMS_API_KEY }}
# The kickstarter/actions/setup-rubygems action is not available
# because this is a public repo
- run: |
mkdir -p ~/.gem
cat <<-YAML > ~/.gem/credentials
---
:rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
YAML
chmod 0600 ~/.gem/credentials
- run: bundle install
- run: bundle exec rake gem:push
8 changes: 8 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ tasks:
- bundle exec rake spec

release:
desc: Publish gem with GitHub
vars:
VERSION:
sh: bundle exec ruby -r replica_pools -e 'puts "v#{ReplicaPools::VERSION}"'
cmds:
- gh release create {{.VERSION}} --generate-notes

release:manual:
desc: Release gem
cmds:
- bundle exec rake release
Expand Down

0 comments on commit 72c93a5

Please sign in to comment.