Skip to content

Commit e342790

Browse files
committed
BRD-20938 convert packages from RubyGems.org to github
1 parent a369465 commit e342790

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to GitHub Gems
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- uses: actions/checkout@v5
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Setup Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
# ruby-version is not needed with a .ruby-version
24+
bundler-cache: true
25+
26+
- name: Install dependencies
27+
run: bundle install
28+
29+
- name: Build gem
30+
run: gem build scorm_engine.gemspec
31+
32+
- name: Publish to GitHub Packages
33+
env:
34+
GEM_HOST_API_KEY: ${{ secrets.GIT_HUB_PACKAGES_TOKEN }}
35+
run: |
36+
gem push --host https://rubygems.pkg.github.com/get-bridge *.gem

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@ A ruby client for Rustici's SCORM Engine 2017.1 API and limited support for the
1515

1616
## Installation
1717

18+
### From GitHub Packages (Recommended)
19+
20+
Remote packages:
21+
New versions are automatically published to GitHub Packages when a git tag matching `v*.*.*` (e.g., `v0.10.0`) is pushed to the repository.
22+
23+
Local packages:
24+
First, configure your Bundler to authenticate with GitHub Packages:
25+
26+
```bash
27+
# Replace YOUR_GITHUB_USERNAME and YOUR_GITHUB_TOKEN with your actual values
28+
bundle config https://rubygems.pkg.github.com/get-bridge YOUR_GITHUB_USERNAME:YOUR_GITHUB_TOKEN
29+
```
30+
31+
You'll need a GitHub Personal Access Token with `read:packages` scope. Create one at:
32+
https://github.com/settings/tokens
33+
34+
Then add this line to your application's Gemfile:
35+
36+
```ruby
37+
source "https://rubygems.pkg.github.com/get-bridge" do
38+
gem 'scorm_engine'
39+
end
40+
```
41+
42+
### From RubyGems (Legacy)
43+
1844
Add this line to your application's Gemfile:
1945

2046
gem 'scorm_engine'

scorm_engine.gemspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ Gem::Specification.new do |spec|
1212
spec.description = "Ruby Client for Rustici's SCORM Engine 24 API v2"
1313
spec.homepage = "https://github.com/get-bridge/scorm_engine"
1414
spec.license = "MIT"
15-
spec.metadata = { "documentation_uri" => "https://get-bridge.github.io/scorm_engine/" }
15+
spec.metadata = {
16+
"documentation_uri" => "https://get-bridge.github.io/scorm_engine/",
17+
"github_repo" => "https://github.com/get-bridge/scorm_engine",
18+
"source_code_uri" => "https://github.com/get-bridge/scorm_engine"
19+
}
1620

1721
spec.files = Dir.glob("{lib,spec}/**/*") + %w[Rakefile .rspec]
1822
spec.bindir = "exe"

0 commit comments

Comments
 (0)