Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06480e6

Browse files
committed
build: automate continuous delivery workflow
Use googleapis/release-please-action and rubygems/release-gem actionsto automate releasing and publishing new gem versions to rubygems.
1 parent1da4c44 commit06480e6

File tree

6 files changed

+98
-86
lines changed

6 files changed

+98
-86
lines changed

‎.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
name:Release Gem
3+
4+
description:|
5+
This workflow creates a new release on GitHub and publishes the gem to
6+
RubyGems.org.
7+
8+
The workflow uses the `googleapis/release-please-action` to handle the
9+
release creation process and the `rubygems/release-gem` action to publish
10+
the gem to rubygems.org
11+
12+
on:
13+
push:
14+
branches:["main"]
15+
16+
workflow_dispatch:
17+
18+
jobs:
19+
release:
20+
runs-on:ubuntu-latest
21+
22+
environment:
23+
name:RubyGems
24+
url:https://rubygems.org/gems/git
25+
26+
permissions:
27+
contents:write
28+
pull-requests:write
29+
id-token:write
30+
31+
steps:
32+
-name:Checkout project
33+
uses:actions/checkout@v4
34+
35+
-name:Create release
36+
uses:googleapis/release-please-action@v4
37+
id:release
38+
with:
39+
token:${{ secrets.AUTO_RELEASE_TOKEN }}
40+
config-file:release-please-config.json
41+
manifest-file:.release-please-manifest.json
42+
43+
-name:Setup ruby
44+
uses:ruby/setup-ruby@v1
45+
if:${{ steps.release.outputs.release_created }}
46+
with:
47+
bundler-cache:true
48+
ruby-version:ruby
49+
50+
-name:Push to RubyGems.org
51+
uses:rubygems/release-gem@v1
52+
if:${{ steps.release.outputs.release_created }}

‎.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".":"3.0.1"
3+
}

‎.yardopts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@
77
README.md
88
CHANGELOG.md
99
CONTRIBUTING.md
10-
RELEASING.md
1110
MAINTAINERS.md

‎RELEASING.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

‎Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,10 @@ task :'test:gem' => :install do
5858

5959
puts'Gem Test Succeeded'
6060
end
61+
62+
# Make it so that calling `rake release` just calls `rake release:rubygem_push` to
63+
# avoid creating and pushing a new tag.
64+
65+
Rake::Task['release'].clear
66+
desc'Customized release task to avoid creating a new tag'
67+
taskrelease:'release:rubygem_push'

‎release-please-config.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"bootstrap-sha":"31374263eafea4e23352494ef4f6bea3ce62c1b5",
3+
"packages": {
4+
".": {
5+
"release-type":"ruby",
6+
"package-name":"git",
7+
"changelog-path":"CHANGELOG.md",
8+
"version-file":"lib/git/version.rb",
9+
"bump-minor-pre-major":true,
10+
"bump-patch-for-minor-pre-major":true,
11+
"draft":false,
12+
"prerelease":false,
13+
"include-component-in-tag":false,
14+
"pull-request-title-pattern":"chore: release v${version}",
15+
"changelog-sections": [
16+
{"type":"feat","section":"Features","hidden":false },
17+
{"type":"fix","section":"Bug Fixes","hidden":false },
18+
{"type":"build","section":"Other Changes","hidden":false },
19+
{"type":"chore","section":"Other Changes","hidden":false },
20+
{"type":"ci","section":"Other Changes","hidden":false },
21+
{"type":"docs","section":"Other Changes","hidden":false },
22+
{"type":"perf","section":"Other Changes","hidden":false },
23+
{"type":"refactor","section":"Other Changes","hidden":false },
24+
{"type":"revert","section":"Other Changes","hidden":false },
25+
{"type":"style","section":"Other Changes","hidden":false },
26+
{"type":"test","section":"Other Changes","hidden":false }
27+
]
28+
}
29+
},
30+
"plugins": [
31+
{
32+
"type":"sentence-case"
33+
}
34+
],
35+
"$schema":"https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
36+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp