Skip to content

Commit 915962a

Browse files
committed
Add support for releasing by GitHub Actions
1 parent ec9d607 commit 915962a

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (C) 2025 Sutou Kouhei <kou@clear-code.com>
2+
#
3+
# License: GPLv3+, GFDL and/or CC BY-SA 3.0
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
18+
name: Release
19+
on:
20+
push:
21+
tags:
22+
- "*"
23+
jobs:
24+
github:
25+
name: GitHub
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 10
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Release
31+
env:
32+
GH_TOKEN: ${{ github.token }}
33+
run: |
34+
ruby \
35+
-e 'print("## "); puts(ARGF.read.split(/^## /)[1])' \
36+
NEWS.md > release-note.md
37+
title="$(head -n 1 release-note.md | sed -e 's/^## //')"
38+
tail -n +2 release-note.md > release-note-without-version.md
39+
gh release create \
40+
${GITHUB_REF_NAME} \
41+
--discussion-category Announcements \
42+
--notes-file release-note-without-version.md \
43+
--title "${title}"
44+
45+
rubygems:
46+
name: RubyGems
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 10
49+
permissions:
50+
id-token: write
51+
environment: release
52+
steps:
53+
- uses: actions/checkout@v5
54+
- uses: ruby/setup-ruby@v1
55+
with:
56+
ruby-version: ruby
57+
- name: Install dependencies
58+
run: |
59+
gem install rabbit
60+
- uses: rubygems/configure-rubygems-credentials@v1.0.0
61+
- name: Push gems
62+
run: |
63+
rake publish:rubygems

NEWS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# NEWS
2+
3+
## ClearCode theme 1.0.6: 2025-08-15
4+
5+
This is a release for Rabbit 4.0.0.
6+
7+
### Improvements
8+
9+
* Added an option to disable auto `as-large-as-possible`.
10+
11+
* Added support for Motoya L Maru font name in Japanese.
12+
13+
* Stopped setting window icon because it's deprecated in Rabbit
14+
4.0.0.

0 commit comments

Comments
 (0)