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
24 changes: 24 additions & 0 deletions .github/workflows/rake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: rake

on:
push:
branches: [main]
tags: [v*]
pull_request:

jobs:
rake:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.4', '4.0']
steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- run: bundle exec rake
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: release

on:
workflow_dispatch:
inputs:
next_version:
required: true
default: 'skip'
repository_dispatch:
types: [do-release]

permissions:
contents: write
id-token: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.ref || 'main' }}

- if: github.event_name == 'repository_dispatch'
run: git fetch --tags origin

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true

- name: Bump version, tag, and push
if: ${{ github.event_name == 'workflow_dispatch' && inputs.next_version != 'skip' && inputs.next_version != '' }}
run: |
gem install gem-release
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
gem bump --version ${{ inputs.next_version }} --tag --push

- name: Build gem
run: gem build jekyll-calconnect-theme.gemspec

- name: Configure RubyGems credentials
uses: rubygems/configure-rubygems-credentials@v1

- name: Publish to RubyGems
run: gem push jekyll-calconnect-theme-*.gem

- name: Wait for release to propagate
run: gem exec rubygems-await jekyll-calconnect-theme-*.gem

- name: Dispatch release-passed event
run: |
GEM_VERSION=$(ruby -e "puts Gem::Specification.load('jekyll-calconnect-theme.gemspec').version")
gh api repos/${{ github.repository }}/dispatches \
-f event_type=release-passed \
-f "client_payload[ref]=refs/tags/v${GEM_VERSION}" \
-f "client_payload[sha]=${{ github.sha }}" \
-f "client_payload[type]=release-passed"
env:
GH_TOKEN: ${{ github.token }}
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

source "https://rubygems.org"

gem "rake"

gemspec
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

require "bundler/gem_tasks"

task default: %i[build]

13 changes: 13 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@
{% if jekyll.environment == 'production' and site.google_analytics %}
{% include google-analytics.html %}
{% endif %}

{% if site.schema_org %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": {{ site.title | jsonify }},
"url": {{ site.url | jsonify }}{% if site.schema_org.logo %},
"logo": {{ site.schema_org.logo | jsonify }}{% endif %}{% if site.description %},
"description": {{ site.description | jsonify }}{% endif %}
}
</script>
{% endif %}
</head>
2 changes: 1 addition & 1 deletion lib/jekyll/calconnect/theme/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Jekyll
module CalconnectTheme
VERSION = "0.2.0"
VERSION = "0.3.0"
end
end
Loading