v0.2.1 #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Trusted publishing to RubyGems.org (OIDC). Configure a pending publisher at: | |
| # https://rubygems.org/profile/oidc/pending_trusted_publishers | |
| # Workflow file name and repository must match RubyGems trusted publisher settings. | |
| # See https://guides.rubygems.org/trusted-publishing/pushing-a-new-gem/ | |
| # and https://guides.rubygems.org/trusted-publishing/releasing-gems/ | |
| name: Push Gem | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| push: | |
| if: github.repository == 'proxymesh/ruby-proxy-headers' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 | |
| with: | |
| egress-policy: audit | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Verify release tag matches gem version | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| VERSION=$(ruby -r ./lib/ruby_proxy_headers/version.rb -e 'puts RubyProxyHeaders::VERSION') | |
| if [ "v${VERSION}" != "${REF_NAME}" ]; then | |
| echo "Release tag must be v${VERSION} (RubyProxyHeaders::VERSION); got ${REF_NAME}" >&2 | |
| exit 1 | |
| fi | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@2e007403fc1ec238429ecaa57af6f22f019cc135 # v1.234.0 | |
| with: | |
| bundler-cache: true | |
| ruby-version: ruby | |
| - uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1 |