Skip to content

Commit 3e0f9ff

Browse files
chore: add release-please for automated releases to RubyGems
1 parent e5f97ae commit 3e0f9ff

File tree

6 files changed

+74
-1
lines changed

6 files changed

+74
-1
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_created: ${{ steps.release.outputs.release_created }}
17+
tag_name: ${{ steps.release.outputs.tag_name }}
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
id: release
21+
22+
rubygems-publish:
23+
needs: release-please
24+
if: ${{ needs.release-please.outputs.release_created == 'true' }}
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: "3.3"
31+
- uses: rubygems/release-gem@v1
32+
with:
33+
await-release: false

.release-please-manifest.json

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

faraday-http-cache.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Gem::Specification.new do |gem|
44
gem.name = 'faraday-http-cache'
5-
gem.version = '2.6.1'
5+
gem.version = File.read(File.join(__dir__, 'lib/faraday/http_cache/version.rb'))
6+
.match(/VERSION\s*=\s*'([^']+)'/)[1]
67
gem.licenses = ['Apache-2.0']
78
gem.description = 'Middleware to handle HTTP caching'
89
gem.summary = 'A Faraday middleware that stores and validates cache expiration.'

lib/faraday/http_cache.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require 'faraday/http_cache/request'
77
require 'faraday/http_cache/response'
88
require 'faraday/http_cache/strategies'
9+
require 'faraday/http_cache/version'
910

1011
module Faraday
1112
# Public: The middleware responsible for caching and serving responses.

lib/faraday/http_cache/version.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
module Faraday
4+
class HttpCache
5+
VERSION = '2.6.1'
6+
end
7+
end

release-please-config.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"pull-request-header": ":rocket: Want to release this?",
3+
"pull-request-title-pattern": "chore(main): release ${version}",
4+
"include-v-in-tag": true,
5+
"bump-minor-pre-major": true,
6+
"bump-patch-for-minor-pre-major": true,
7+
"always-bump-patch": true,
8+
"packages": {
9+
".": {
10+
"release-type": "ruby",
11+
"changelog-sections": [
12+
{"type": "feat", "section": "Features", "hidden": false},
13+
{"type": "fix", "section": "Bug Fixes", "hidden": false},
14+
{"type": "chore", "section": "Miscellaneous", "hidden": false},
15+
{"type": "docs", "section": "Documentation", "hidden": false},
16+
{"type": "refactor", "section": "Code Refactoring", "hidden": false},
17+
{"type": "test", "section": "Tests", "hidden": false},
18+
{"type": "build", "section": "Build System", "hidden": false},
19+
{"type": "ci", "section": "Continuous Integration", "hidden": false},
20+
{"type": "perf", "section": "Performance Improvements", "hidden": false},
21+
{"type": "style", "section": "Styles", "hidden": true},
22+
{"type": "revert", "section": "Reverts", "hidden": false},
23+
{"type": "", "section": "Other Changes", "hidden": false}
24+
]
25+
}
26+
},
27+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
28+
}

0 commit comments

Comments
 (0)