release #4
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
| name: release | |
| concurrency: | |
| group: "release-${{ inputs.version_tag }}" | |
| cancel-in-progress: false | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version_tag: | |
| description: "Version tag to release (e.g., v2.9.1)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/build-gems.yml | |
| with: | |
| release: true | |
| artifact_prefix: "release-${{ inputs.version_tag }}-" | |
| ref: ${{ inputs.version_tag }} | |
| push: | |
| name: "Push gems to RubyGems.org" | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| path: gems | |
| pattern: "release-${{ inputs.version_tag }}-*-gem" | |
| merge-multiple: true | |
| - name: Print checksums | |
| run: ls gems/*.gem | sort | xargs sha256sum | |
| - uses: rubygems/configure-rubygems-credentials@bc6dd217f8a4f919d6835fcfefd470ef821f5c44 # v1.0.0 | |
| - name: Push gems | |
| run: | | |
| for gem in gems/*.gem; do | |
| echo "Pushing ${gem} ..." | |
| gem push "${gem}" || echo "WARNING: Failed to push ${gem} (may already exist)" | |
| done |