Skip to content

Commit

Permalink
Add publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Jul 31, 2024
1 parent 973f8e7 commit 71fcfa8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish packages

on:
push:
tags:
- *

jobs:
rubygems:
runs-on: ubuntu-latest

environment: packages

permissions:
id-token: write

defaults:
run:
shell: bash
working-directory: build/ruby

steps:
# Set up
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
- name: Install gems
run: bundle install
- name: Set version
run: bundle exec rake release:version[${{ github.ref_name }}]
- name: Generate ruby
run: bundle exec rake generate_ruby:all

# Release
- uses: rubygems/[email protected]
- name: Publish gem
run: bundle exec rake release:rubygem_push
- name: Wait for release
run: gem exec rubygems-await pkg/*.gem
3 changes: 3 additions & 0 deletions build/ruby/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ namespace :generate_ruby do
end
end
end

desc "Generate ruby files for all protocols"
task all: ["generate_ruby:internal"]
end

namespace :release do
Expand Down

0 comments on commit 71fcfa8

Please sign in to comment.