Skip to content

Commit c6e74bb

Browse files
authored
Release gem from 2.5-stable via GitHub Actions (#802)
Merge pull request 802
1 parent 325915f commit c6e74bb

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release Gem
2+
3+
on:
4+
push:
5+
branches:
6+
- "2.5-stable"
7+
paths:
8+
- "theme_version.rb"
9+
10+
jobs:
11+
release:
12+
if: "github.repository_owner == 'jekyll'"
13+
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
14+
runs-on: "ubuntu-latest"
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
ruby_version: [ "3.3" ]
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
23+
uses: ruby/setup-ruby@v1
24+
with:
25+
ruby-version: ${{ matrix.ruby_version }}
26+
bundler-cache: true
27+
- name: Build and Publish Gem
28+
uses: ashmaroli/release-gem@dist
29+
with:
30+
gemspec_name: minima
31+
env:
32+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}

minima.gemspec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# frozen_string_literal: true
22

3+
require_relative "theme_version"
4+
35
Gem::Specification.new do |spec|
46
spec.name = "minima"
5-
spec.version = "2.5.1"
7+
spec.version = Minima::VERSION
68
spec.authors = ["Joel Glovier"]
79
spec.email = ["jglovier@github.com"]
810

@@ -16,8 +18,9 @@ Gem::Specification.new do |spec|
1618
f.match(%r!^(assets|_(includes|layouts|sass)/|(LICENSE|README)((\.(txt|md|markdown)|$)))!i)
1719
end
1820

21+
spec.required_ruby_version = ">= 2.7.0"
22+
1923
spec.add_runtime_dependency "jekyll", ">= 3.5", "< 5.0"
2024
spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
2125
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"
22-
spec.add_development_dependency "bundler", ">= 1.15"
2326
end

theme_version.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
module Minima
4+
VERSION = "2.5.2"
5+
end

0 commit comments

Comments
 (0)