Skip to content
Open
Show file tree
Hide file tree
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/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

changelog:
exclude:
labels:
- duplicate
- invalid
- modulesync
- question
- skip-changelog
- wont-fix
- wontfix
- github_actions

categories:
- title: Breaking Changes 🛠
labels:
- backwards-incompatible

- title: New Features 🎉
labels:
- enhancement

- title: Bug Fixes 🐛
labels:
- bug
- bugfix

- title: Documentation Updates 📚
labels:
- documentation
- docs

- title: Dependency Updates ⬆️
labels:
- dependencies

- title: Other Changes
labels:
- "*"
96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
name: Gem Release

on:
push:
tags:
- '*'

jobs:
build-release:
# Prevent releases from forked repositories
if: github.repository_owner == 'OpenVoxProject'
name: Build the gem
runs-on: ubuntu-24.04
permissions:
contents: write # clone repo and create release
steps:
- uses: actions/checkout@v4
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'ruby'
- name: Build gem
shell: bash
run: gem build --verbose *.gemspec
- name: Upload gem to GitHub cache
uses: actions/upload-artifact@v4
with:
name: gem-artifact
path: '*.gem'
retention-days: 1
compression-level: 0
- 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 }} *.gem

release-to-github:
needs: build-release
name: Release to GitHub
runs-on: ubuntu-24.04
permissions:
packages: write # publish to rubygems.pkg.github.com
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
with:
name: gem-artifact
- name: Publish gem to GitHub packages
run: GEM_HOST_API_KEY=${{ secrets.GITHUB_TOKEN }} gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem

release-to-rubygems:
needs: build-release
name: Release gem to rubygems.org
runs-on: ubuntu-24.04
environment: release # recommended by rubygems.org
permissions:
id-token: write # rubygems.org authentication
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
with:
name: gem-artifact
- uses: rubygems/[email protected]
- name: Publish gem to rubygems.org
shell: bash
run: gem push *.gem

release-verification:
name: Check that all releases are done
runs-on: ubuntu-24.04
permissions:
contents: read # minimal permissions that we have to grant
needs:
- release-to-github
- release-to-rubygems
steps:
- name: Download gem from GitHub cache
uses: actions/download-artifact@v4
with:
name: gem-artifact
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 'ruby'
- name: Wait for release to propagate
shell: bash
run: |
gem install rubygems-await
gem await *.gem