From ddde7bc018e6d7554f48a6d3a535c61c3eb21eba Mon Sep 17 00:00:00 2001 From: Brandon Keepers Date: Thu, 25 Jan 2024 12:11:01 -0500 Subject: [PATCH] Use official Ruby gem for publishing --- .github/workflows/release.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31c83357..ccde34c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,17 +3,14 @@ on: release jobs: build: runs-on: ubuntu-latest + permissions: + id-token: write # mandatory for trusted publishing + contents: write # required for `rake release` to push the release tag steps: - uses: actions/checkout@v4 - - name: Release dotenv - uses: cadwallion/publish-rubygems-action@master - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} - RELEASE_COMMAND: rake dotenv:release - - name: Release dotenv-rails - uses: cadwallion/publish-rubygems-action@master - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} - RELEASE_COMMAND: rake dotenv-rails:release + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + - uses: rubygems/release-gem@v1