From 72c93a52c932b43c61bafd4211f2babc29bdf6b8 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 8 Jan 2024 12:55:08 -0500 Subject: [PATCH] fix release action private actions aren't available on public repos make ksr release use GitHub actions move old release to release:manual --- .github/workflows/test-release.yml | 12 +++++++++--- Taskfile.yml | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index eeb223a..aada852 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -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 diff --git a/Taskfile.yml b/Taskfile.yml index 6a7e290..ee377d3 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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