Skip to content

Commit 825bee9

Browse files
committed
ci: publish Ruby gem to GitHub Packages
1 parent 6e833e7 commit 825bee9

3 files changed

Lines changed: 23 additions & 9 deletions

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ on:
1212

1313
permissions:
1414
contents: read
15+
packages: write
1516

1617
jobs:
1718
publish:
18-
name: Publish to RubyGems
19+
name: Publish gem
1920
runs-on: ubuntu-latest
2021
environment: rubygems
2122
steps:
@@ -33,6 +34,16 @@ jobs:
3334
- name: Build gem
3435
run: gem build arcp.gemspec
3536

37+
- name: Publish to GitHub Packages
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
mkdir -p ~/.gem
42+
printf -- "---\n:github: Bearer %s\n" "$GITHUB_TOKEN" > ~/.gem/credentials
43+
chmod 0600 ~/.gem/credentials
44+
gem push --key github --host https://rubygems.pkg.github.com/agentruntimecontrolprotocol arcp-*.gem
45+
rm -f ~/.gem/credentials
46+
3647
- name: Publish to RubyGems
3748
env:
3849
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,13 @@ the changelog. Prefer clarity over cleverness in a library others build on.
131131
## Releases
132132

133133
Releases are cut by maintainers. The gem is published to
134-
[RubyGems.org](https://rubygems.org/gems/arcp); pushing a `v*` tag triggers the
135-
`publish` GitHub Actions workflow, which builds `arcp.gemspec` and runs
136-
`gem push`. The SDK is versioned with semantic versioning independently of the
137-
protocol version it speaks; a protocol version bump is noted in the changelog
138-
when the negotiated ARCP version changes.
134+
[RubyGems.org](https://rubygems.org/gems/arcp) and GitHub Packages; pushing a
135+
`v*` tag triggers the `publish` GitHub Actions workflow, which builds
136+
`arcp.gemspec`, publishes the gem to GitHub Packages under the
137+
`agentruntimecontrolprotocol` namespace, and then runs `gem push` for RubyGems.
138+
The SDK is versioned with semantic versioning independently of the protocol
139+
version it speaks; a protocol version bump is noted in the changelog when the
140+
negotiated ARCP version changes.
139141

140142
## License
141143

arcp.gemspec

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ Gem::Specification.new do |spec|
1515
replay, capability negotiation, leases with budget and expiration, streamed
1616
results, and OpenTelemetry trace propagation. Built on socketry/async.
1717
DESC
18-
spec.homepage = 'https://github.com/nficano/arpc'
18+
spec.homepage = 'https://github.com/agentruntimecontrolprotocol/ruby-sdk'
1919
spec.license = 'Apache-2.0'
2020

2121
spec.required_ruby_version = '>= 3.3.0'
2222

23-
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/ruby-sdk/CHANGELOG.md"
24-
spec.metadata['source_code_uri'] = 'https://github.com/nficano/arpc.git'
23+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
24+
spec.metadata['source_code_uri'] = "#{spec.homepage}.git"
2525
spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
26+
spec.metadata['github_repo'] = 'ssh://github.com/agentruntimecontrolprotocol/ruby-sdk'
2627

2728
spec.files = Dir[
2829
'lib/**/*.rb',

0 commit comments

Comments
 (0)