Skip to content

Borrow the release workflow from the main branch #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Gem Release

on:
push:
tags:
- '7.*'

jobs:
release:
name: Release gem
runs-on: ubuntu-24.04
# Optional but recommended to use a specific environment
environment: release
# Prevent releases from forked repositories
if: github.repository_owner == 'OpenVoxProject'

permissions:
id-token: write
contents: write
packages: write

steps:
- uses: voxpupuli/ruby-release@v0
- name: Setup GitHub packages access
run: |
mkdir -p ~/.gem
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Publish gem to GitHub packages
run: gem push --key github --host https://rubygems.pkg.github.com/OpenVoxProject *.gem
- name: Create Release Page
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: gh release create ${{ github.ref_name }} --generate-notes
- name: Attach gem to GitHub Release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload ${{ github.ref_name }} pkg/*.gem
Loading