jekyll_test_plugin 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gem.yml +20 -12
- data/.github/workflows/scripts/tag_info.rb +24 -0
- data/Rakefile +29 -0
- data/lib/jekyll_test_plugin/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a4e120156156aa95c5243f4a57951686163d28f9c2e37e59c8af7ac86925d28
|
4
|
+
data.tar.gz: de6e8e324b8e1bb3b7b1de2d9f0283e0fa687bc787b320218362fbfe6e445900
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeb41a2ca05835ae3173b9dc3233cc65b2e81935c89a1f40989046d86735d049618ceab55832d8544cfbf8b9df20694797b52062ed18638523e143be2d22a737
|
7
|
+
data.tar.gz: 3f9e61fbf7bc44f48365749ca103aa57aea9dfe583b81d5b98009b17150c16554625e6af78f649b75c2fdfda612dabb7dc8eb0692c1a618136c43a8a4d161c05
|
data/.github/workflows/gem.yml
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
name: Gem
|
1
|
+
name: Release Gem
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
|
6
|
-
- "
|
5
|
+
paths:
|
6
|
+
- "lib/**/version.rb"
|
7
7
|
|
8
8
|
jobs:
|
9
|
-
|
10
|
-
if: "github.repository_owner == 'jekyll'
|
11
|
-
name: "
|
9
|
+
release:
|
10
|
+
if: "github.repository_owner == 'jekyll'"
|
11
|
+
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
|
12
12
|
runs-on: "ubuntu-latest"
|
13
13
|
strategy:
|
14
14
|
fail-fast: true
|
@@ -25,17 +25,25 @@ jobs:
|
|
25
25
|
bundler-cache: true
|
26
26
|
- name: Extract Plugin Version
|
27
27
|
id: plugin-meta
|
28
|
-
run:
|
28
|
+
run: |
|
29
|
+
echo "::set-output name=tag_version::$(bundle exec rake project:tag_version)"
|
30
|
+
echo "::set-output name=gem_name::$(bundle exec rake project:gem_name)"
|
29
31
|
shell: bash
|
30
|
-
- name:
|
31
|
-
|
32
|
+
- name: Tag Details
|
33
|
+
env:
|
34
|
+
EVENT_JSON: ${{ toJSON(github.event) }}
|
35
|
+
run: bundle exec ruby .github/workflows/scripts/tag_info.rb
|
36
|
+
- name: "Build Gem (${{ steps.plugin-meta.outputs.gem_name }})"
|
37
|
+
run: bundle exec rake build
|
32
38
|
- name: Archive gem as artifact
|
33
39
|
uses: actions/upload-artifact@v2
|
34
40
|
with:
|
35
|
-
name: "
|
36
|
-
path: "
|
41
|
+
name: "${{ steps.plugin-meta.outputs.gem_name }}"
|
42
|
+
path: "pkg/${{ steps.plugin-meta.outputs.gem_name }}.gem"
|
37
43
|
retention-days: 5
|
38
44
|
- name: Release Gem via Rubygems.org
|
39
45
|
env:
|
40
46
|
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}
|
41
|
-
run:
|
47
|
+
run: |
|
48
|
+
gem push pkg/${{ steps.plugin-meta.outputs.gem_name }}.gem
|
49
|
+
git push origin ${{ steps.plugin-meta.outputs.tag_version }}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "colorator"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
data = JSON.parse(ENV["EVENT_JSON"])
|
7
|
+
label = %Q(TAG #{data["ref"].delete_prefix("refs/tags/").cyan})
|
8
|
+
puts <<-TEXT
|
9
|
+
|
10
|
+
---------------------------------------------------------
|
11
|
+
#{label.center(64)}
|
12
|
+
---------------------------------------------------------
|
13
|
+
Pushed by: #{data.dig("pusher", "name")&.cyan}
|
14
|
+
Repository: #{data.dig("repository", "full_name")&.cyan}
|
15
|
+
|
16
|
+
Head Commit Details:
|
17
|
+
|
18
|
+
#{data.dig("head_commit", "message").inspect.cyan}
|
19
|
+
|
20
|
+
Author: #{data.dig("head_commit", "author", "username")&.cyan}
|
21
|
+
Committer: #{data.dig("head_commit", "committer", "username")&.cyan}
|
22
|
+
SHA ID: #{data.dig("head_commit", "id")&.cyan}
|
23
|
+
---------------------------------------------------------
|
24
|
+
TEXT
|
data/Rakefile
CHANGED
@@ -1 +1,30 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
namespace :project do
|
4
|
+
require "forwardable"
|
5
|
+
|
6
|
+
module Project
|
7
|
+
class Spec
|
8
|
+
extend Forwardable
|
9
|
+
|
10
|
+
def_delegators :@gemspec, :name, :version
|
11
|
+
|
12
|
+
def initialize(name)
|
13
|
+
gemspec_file = "#{name}.gemspec"
|
14
|
+
@gemspec = Bundler.load_gemspec(gemspec_file)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
spec = Project::Spec.new("jekyll_test_plugin")
|
20
|
+
|
21
|
+
desc "Print basename of built gem."
|
22
|
+
task :gem_name do
|
23
|
+
puts "#{spec.name}-#{spec.version}"
|
24
|
+
end
|
25
|
+
|
26
|
+
desc "Print lib version prefixed with 'v'."
|
27
|
+
task :tag_version do
|
28
|
+
puts "v#{spec.version}"
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_test_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Parker Moore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".github/workflows/gem.yml"
|
63
|
+
- ".github/workflows/scripts/tag_info.rb"
|
63
64
|
- ".gitignore"
|
64
65
|
- Gemfile
|
65
66
|
- History.markdown
|