Skip to content

Commit

Permalink
Merge pull request #20 from ryancyq/changelog
Browse files Browse the repository at this point in the history
ci: add changelog generator workflow
  • Loading branch information
ryancyq authored Oct 1, 2024
2 parents 24c7625 + cad840a commit 1e25664
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Generate CHANGELOG.md

on:
workflow_run: # only runs on default branch
workflows: [CI]
types: [completed]
branches: [main]
workflow_dispatch:
schedule:
- cron: 0 12 * * 5

concurrency:
group: generate-changelog
cancel-in-progress: true

jobs:
changelog_generator:
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 3

steps:
- uses: actions/checkout@v4

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

- run: bundle exec rake changelog
env:
CHANGELOG_GITHUB_TOKEN: ${{ github.token }}

- uses: ryancyq/github-signed-commit@v1
env:
GH_TOKEN: ${{ github.token }}
with:
files: |
CHANGELOG.md
commit-message: "ci: update CHANGELOG.md"
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ group :development do
gem "rubocop", "~> 1.65", require: false
gem "rubocop-rake", require: false
gem "rubocop-rspec", require: false

gem "github_changelog_generator", "~> 1.16", require: false
end

group :test do
Expand Down
89 changes: 89 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,103 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
ast (2.4.2)
async (2.17.0)
console (~> 1.26)
fiber-annotation
io-event (~> 1.6, >= 1.6.5)
async-http (0.79.0)
async (>= 2.10.2)
async-pool (~> 0.7)
io-endpoint (~> 0.11)
io-stream (~> 0.4)
protocol-http (~> 0.37)
protocol-http1 (~> 0.27)
protocol-http2 (~> 0.19)
traces (>= 0.10)
async-http-faraday (0.19.0)
async-http (~> 0.42)
faraday
async-pool (0.8.1)
async (>= 1.25)
metrics
traces
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
console (1.27.0)
fiber-annotation
fiber-local (~> 1.1)
json
crack (1.0.0)
bigdecimal
rexml
diff-lcs (1.5.1)
docile (1.4.1)
drb (2.2.1)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-http-cache (2.5.1)
faraday (>= 0.8)
faraday-net_http (3.3.0)
net-http
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (1.0.0)
github_changelog_generator (1.16.4)
activesupport
async (>= 1.25.0)
async-http-faraday
faraday-http-cache
multi_json
octokit (~> 4.6)
rainbow (>= 2.2.1)
rake (>= 10.0)
hashdiff (1.1.1)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-endpoint (0.13.1)
io-event (1.6.5)
io-stream (0.4.1)
json (2.7.2)
language_server-protocol (3.17.0.3)
logger (1.6.1)
metrics (0.10.2)
minitest (5.25.1)
multi_json (1.15.0)
net-http (0.4.1)
uri
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
parallel (1.26.3)
parser (3.3.5.0)
ast (~> 2.4.1)
racc
protocol-hpack (1.5.1)
protocol-http (0.37.0)
protocol-http1 (0.27.0)
protocol-http (~> 0.22)
protocol-http2 (0.19.2)
protocol-hpack (~> 1.4)
protocol-http (~> 0.18)
public_suffix (5.1.1)
racc (1.8.1)
rainbow (3.1.1)
Expand Down Expand Up @@ -60,6 +140,10 @@ GEM
rubocop-rspec (3.0.5)
rubocop (~> 1.61)
ruby-progressbar (1.13.0)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.3.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -70,7 +154,11 @@ GEM
simplecov-html (0.13.0)
simplecov_json_formatter (0.1.4)
thor (1.3.2)
traces (0.13.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
uri (0.13.1)
vcr (6.3.1)
base64
webmock (3.24.0)
Expand All @@ -86,6 +174,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
github_changelog_generator (~> 1.16)
rake (~> 13.0)
rodiff!
rspec (~> 3.12)
Expand Down
7 changes: 7 additions & 0 deletions tasks/changelog.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require "github_changelog_generator/task"
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.user = "ryancyq"
config.project = "rodiff"
end

0 comments on commit 1e25664

Please sign in to comment.