From 5446b5dbd161bfb49be922b84788be88dffa308a Mon Sep 17 00:00:00 2001 From: r7kamura Date: Sat, 31 Oct 2026 17:07:32 +0900 Subject: [PATCH] Use Trusted Publishing for gem release --- .github/workflows/bump-request.yml | 26 ++++++++++++++++++++++++++ .github/workflows/release.yml | 11 +++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/bump-request.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/bump-request.yml b/.github/workflows/bump-request.yml new file mode 100644 index 0000000..118587f --- /dev/null +++ b/.github/workflows/bump-request.yml @@ -0,0 +1,26 @@ +name: bump-request + +on: + workflow_dispatch: + inputs: + version: + description: Version to change to. + required: true + type: string + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + bundler-cache: true + - uses: r7kamura/bump-request@v0 + with: + command: | + sed -i -r 's/([0-9]+\.[0-9]+\.[0-9]+)/${{ inputs.version }}/' lib/*/version.rb + bundle install + version: ${{ inputs.version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..21d0cd0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,11 @@ +name: release + +on: + push: + branches: + - main + +jobs: + release: + uses: r7kamura/workflows/.github/workflows/gem-release.yml@main + if: github.repository_owner == 'r7kamura'