Skip to content
Merged
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
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish to GitHub Gems

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

jobs:
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
# ruby-version is not needed with a .ruby-version
bundler-cache: true

- name: Install dependencies
run: bundle install

- name: Build gem
run: gem build scorm_engine.gemspec

- name: Publish to GitHub Packages
env:
GEM_HOST_API_KEY: ${{ secrets.GIT_HUB_PACKAGES_TOKEN }}
run: |
gem push --host https://rubygems.pkg.github.com/get-bridge *.gem
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,32 @@ A ruby client for Rustici's SCORM Engine 2017.1 API and limited support for the

## Installation

### From GitHub Packages (Recommended)

Remote packages:
New versions are automatically published to GitHub Packages when a git tag matching `v*.*.*` (e.g., `v0.10.0`) is pushed to the repository.

Local packages:
First, configure your Bundler to authenticate with GitHub Packages:

```bash
# Replace YOUR_GITHUB_USERNAME and YOUR_GITHUB_TOKEN with your actual values
bundle config https://rubygems.pkg.github.com/get-bridge YOUR_GITHUB_USERNAME:YOUR_GITHUB_TOKEN
```

You'll need a GitHub Personal Access Token with `read:packages` scope. Create one at:
https://github.com/settings/tokens

Then add this line to your application's Gemfile:

```ruby
source "https://rubygems.pkg.github.com/get-bridge" do
gem 'scorm_engine'
end
```

### From RubyGems (Legacy)

Add this line to your application's Gemfile:

gem 'scorm_engine'
Expand Down
7 changes: 6 additions & 1 deletion scorm_engine.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ Gem::Specification.new do |spec|
spec.description = "Ruby Client for Rustici's SCORM Engine 24 API v2"
spec.homepage = "https://github.com/get-bridge/scorm_engine"
spec.license = "MIT"
spec.metadata = { "documentation_uri" => "https://get-bridge.github.io/scorm_engine/" }
spec.metadata = {
"documentation_uri" => "https://get-bridge.github.io/scorm_engine/",
Comment thread
jamesh-gomo marked this conversation as resolved.
"github_repo" => "https://github.com/get-bridge/scorm_engine",
"source_code_uri" => "https://github.com/get-bridge/scorm_engine",
"allowed_push_host" => "https://rubygems.pkg.github.com/get-bridge"
}

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