From 16bc03a69a37b346163add451b913ef9fb5aef62 Mon Sep 17 00:00:00 2001 From: Jan Zaydowicz Date: Fri, 10 Jan 2025 09:49:19 +0100 Subject: [PATCH] chi: automate release process use the Github action support to automate the release process and remove any secret fiddling https://guides.rubygems.org/trusted-publishing/adding-a-publisher/ --- .github/workflows/release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5e967ec --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release + +on: + release: + types: [published] + +jobs: + push: + name: Push gem to RubyGems.org + runs-on: ubuntu-latest + + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag + + steps: + # Set up + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + + # Release + - uses: rubygems/release-gem@v1