Skip to content

Commit

Permalink
Merge pull request #898 from github/publishing-workflow
Browse files Browse the repository at this point in the history
Create publish-gem.yml
  • Loading branch information
tsusdere committed Jan 9, 2024
2 parents 1525bbb + 47322fd commit 974872f
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 36 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Gem

on:
release:
types: [released]

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Build gem
run: |
gem build github-pages.gemspec
- name: Publish
run: |
gem push github-pages.gem --key ${{ secrets.PAGES_GEM_PUBLISH }}
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
strategy:
matrix:
ruby:
- 2.6
- 2.7
- '3.0'
- '3.3'
steps:
- uses: actions/checkout@v4
- name: script/cibuild-docker
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require:
- rubocop-performance

AllCops:
TargetRubyVersion: 2.5
TargetRubyVersion: 3.0
Exclude:
- 'bin/**/*'
- 'script/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.3
3.3
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUBY_VERSION=2.7.3
ARG RUBY_VERSION=3.3
FROM ruby:$RUBY_VERSION

RUN apt-get update \
Expand All @@ -8,6 +8,7 @@ RUN apt-get update \
make \
nodejs

# final version for rubygems-update to supoprt ruby 2.7, consider removing this after upgraded to ruby 3.0
RUN gem update --system

COPY .git /src/gh/pages-gem/.git
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.3-alpine
FROM ruby:3.3-alpine

RUN apk update && apk add --no-cache \
git
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gemspec
gem "jekyll-octicons"

group :test do
gem "rubocop", "~> 0.79"
gem "rubocop", "~> 1.37"
gem "rubocop-performance"
gem "webmock"
end
2 changes: 1 addition & 1 deletion github-pages.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ Gem::Specification.new do |s|
s.add_development_dependency("jekyll_test_plugin_malicious", "~> 0.2")
s.add_development_dependency("pry", "~> 0.10")
s.add_development_dependency("rspec", "~> 3.3")
s.add_development_dependency("rubocop-github", "0.16.0")
s.add_development_dependency("rubocop-github", "0.20.0")
end
4 changes: 2 additions & 2 deletions lib/github-pages/dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module GitHubPages
class Dependencies
VERSIONS = {
# Jekyll
"jekyll" => "3.9.3",
"jekyll" => "3.9.4",
"jekyll-sass-converter" => "1.5.2",

# Converters
Expand Down Expand Up @@ -63,7 +63,7 @@ def self.version_report
require "nokogiri"

{
"ruby" => RUBY_VERSION,
"ruby" => "3.3",

# Gem versions we're curious about
"github-pages" => VERSION.to_s,
Expand Down
5 changes: 1 addition & 4 deletions script/cibuild-docker
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@

set -ex

# Set the ruby version in the Action definition matrix.
: "${RUBY_VERSION:="2.7.3"}"

docker build --build-arg "RUBY_VERSION=$RUBY_VERSION" -t github-pages .
docker build -t github-pages .
docker run --rm --workdir /src/gh/pages-gem github-pages script/cibuild

0 comments on commit 974872f

Please sign in to comment.