Skip to content

Commit 68716e6

Browse files
authored
Merge branch 'develop' into feature/acms-vite-plugin
2 parents fd61fb1 + 2cf3736 commit 68716e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2588
-422
lines changed

.github/workflows/release.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up environment variables
18+
id: vars
19+
run: |
20+
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
21+
echo "RELEASE_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
22+
echo "ZIP_NAME=acms-develop-${GITHUB_REF#refs/tags/}.zip" >> $GITHUB_ENV
23+
24+
- name: Create release zip
25+
run: |
26+
# Create temporary directory structure
27+
mkdir -p temp/ac
28+
mkdir -p temp/ac/bin
29+
mkdir -p temp/ac/themes
30+
31+
# Copy bin/develop to bin/develop
32+
cp -r bin/develop temp/ac/bin/
33+
34+
# Copy src/develop to themes/develop
35+
cp -r src/develop temp/ac/themes/
36+
37+
# Create zip file
38+
cd temp
39+
zip -r ../${{ env.ZIP_NAME }} ac
40+
cd ..
41+
42+
echo "Created zip file: ${{ env.ZIP_NAME }}"
43+
44+
- name: Generate release notes
45+
id: release_notes
46+
uses: actions/github-script@v7
47+
with:
48+
script: |
49+
const tagName = process.env.TAG_NAME;
50+
const previousTag = await github.rest.git.listMatchingRefs({
51+
owner: context.repo.owner,
52+
repo: context.repo.repo,
53+
ref: 'tags/'
54+
}).then(response => {
55+
const tags = response.data
56+
.map(ref => ref.ref.replace('refs/tags/', ''))
57+
.filter(tag => tag !== tagName)
58+
.sort();
59+
return tags.length > 0 ? tags[tags.length - 1] : null;
60+
});
61+
62+
let compareCommits;
63+
if (previousTag) {
64+
compareCommits = await github.rest.repos.compareCommits({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
base: previousTag,
68+
head: tagName
69+
});
70+
} else {
71+
// If no previous tag, get all commits
72+
compareCommits = await github.rest.repos.listCommits({
73+
owner: context.repo.owner,
74+
repo: context.repo.repo,
75+
per_page: 100
76+
});
77+
}
78+
79+
const commits = previousTag ? compareCommits.data.commits : compareCommits.data;
80+
81+
// Categorize commits
82+
const bugfixes = [];
83+
const features = [];
84+
const changes = [];
85+
const other = [];
86+
87+
for (const commit of commits) {
88+
const message = commit.commit.message.split('\n')[0];
89+
if (message.toLowerCase().includes('fix') || message.toLowerCase().includes('bug')) {
90+
bugfixes.push(`- ${message} (${commit.sha.substring(0, 7)})`);
91+
} else if (message.toLowerCase().includes('feat') || message.toLowerCase().includes('add')) {
92+
features.push(`- ${message} (${commit.sha.substring(0, 7)})`);
93+
} else if (message.toLowerCase().includes('change') || message.toLowerCase().includes('update')) {
94+
changes.push(`- ${message} (${commit.sha.substring(0, 7)})`);
95+
} else {
96+
other.push(`- ${message} (${commit.sha.substring(0, 7)})`);
97+
}
98+
}
99+
100+
// Create release notes
101+
let releaseNotes = `# Release ${tagName}\n\n`;
102+
103+
if (bugfixes.length > 0) {
104+
releaseNotes += `## :hammer_and_wrench: 不具合修正\n${bugfixes.join('\n')}\n\n`;
105+
}
106+
107+
if (features.length > 0) {
108+
releaseNotes += `## :rocket: 新機能\n${features.join('\n')}\n\n`;
109+
}
110+
111+
if (changes.length > 0) {
112+
releaseNotes += `## :wrench: 仕様変更\n${changes.join('\n')}\n\n`;
113+
}
114+
115+
if (other.length > 0) {
116+
releaseNotes += `## その他\n${other.join('\n')}\n\n`;
117+
}
118+
119+
return releaseNotes;
120+
121+
- name: Create GitHub Release
122+
id: create_release
123+
uses: actions/create-release@v1
124+
env:
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
with:
127+
tag_name: ${{ env.TAG_NAME }}
128+
release_name: Release ${{ env.RELEASE_NAME }}
129+
body: ${{ steps.release_notes.outputs.result }}
130+
draft: false
131+
prerelease: false
132+
133+
- name: Upload Release Asset
134+
uses: actions/upload-release-asset@v1
135+
env:
136+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137+
with:
138+
upload_url: ${{ steps.create_release.outputs.upload_url }}
139+
asset_path: ./${{ env.ZIP_NAME }}
140+
asset_name: ${{ env.ZIP_NAME }}
141+
asset_content_type: application/zip

src/develop/_entry.html

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,18 @@
33
@section("main")
44
<article>
55
@include("/include/entry/body.html", {
6-
"module_id": "body",
76
"sns_share": "true"
87
})
98

10-
</article>
11-
@endsection
12-
13-
@section("aside")
14-
<section>
15-
<h2 class="mb-5 text-xl font-bold">目次</h2>
16-
<!-- 参照元:Entry_Body -->
17-
<!-- GET_Rendered id="entry-outline" -->
18-
</section>
9+
<section class="mt-16 md:mt-20 grid gap-y-8">
10+
<div>
11+
<h2 class="text-lg font-bold">関連記事</h2>
12+
<p class="mt-3"><span>この記事のハッシュタグ</span><!-- BEGIN_MODULE Tag_Cloud ctx="eid/%{EID}" --><span class="flex my-0.5 md:my-0 md:inline md:ml-3"><!-- BEGIN tag:loop --><span class="mr-3"><a href="{path}" class="text-gray-900 no-underline hover:opacity-70">#{name}</a></span><!-- END tag:loop --></span><!-- END_MODULE Tag_Cloud --><span>から関連する記事を表示しています。</span></p>
13+
</div>
1914

20-
<section class="mt-12">
21-
<h2 class="mb-5 text-xl font-bold">カテゴリー</h2>
22-
@include("/include/category/list-side.html", {
23-
"module_id": "category_list"
24-
})
25-
</section>
26-
27-
<section class="mt-12">
28-
<h2 class="mb-5 text-xl font-bold">アーカイブ</h2>
29-
@include("/include/entry/archive-list-side.html", {
30-
"module_id": "archive_list"
31-
})
32-
</section>
15+
@include("/include/entry/tag-relational-card.html")
3316

34-
<section class="mt-12">
35-
<h2 class="mb-5 text-xl font-bold">ハッシュタグ</h2>
36-
@include("/include/tag-cloud/side.html", {
37-
"module_id": "tag_cloud"
38-
})
39-
</section>
40-
41-
<section class="mt-8">
42-
<h2 class="sr-only">キーワード検索</h2>
43-
@include("/include/parts/search-keyword.html")
44-
</section>
45-
46-
<section class="mt-12">
47-
<h2 class="text-xl font-bold">プロフィール</h2>
48-
@include("/include/parts/profile-card.html")
49-
</section>
50-
@endsection
17+
@include("/include/entry/tag-relational-tiny.html")
18+
</section>
19+
</article>
20+
@endsection

src/develop/_layouts/base.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@
3131
@include("/admin/switch-user.html")
3232
@endsection
3333

34-
<main>
34+
<main class="container py-20">
35+
@section("topicpath")
36+
<!-- BEGIN_MODULE Touch_NotTop -->
37+
<div class="mb-10">
38+
@include("/include/topicpath.html")
39+
</div>
40+
<!-- END_MODULE Touch_NotTop -->
41+
@endsection
42+
3543
@section("main")
3644
<p>継承してメインコンテンツを設定してください</p>
3745

@@ -40,11 +48,6 @@
4048
@endsection
4149
</main>
4250

43-
<!-- CTAセクション -->
44-
@section("cta")
45-
@include("/include/parts/cta.html")
46-
@endsection
47-
4851
<!-- フッター -->
4952
@section("footer")
5053
@include("/include/footer.html")

src/develop/_layouts/mail.html

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
<html>
2+
@section("head")
3+
<head>
4+
<style class="zccustomstyles" type="text/css">
5+
.ze_body{
6+
font-family: Verdana,arial, Helvetica, sans-serif;
7+
}
8+
.container {
9+
background: #FAFAFA;
10+
}
11+
table.mail-body {
12+
border-top: 4px solid #c40f31;
13+
}
14+
img {
15+
display: block;
16+
text-align: center;
17+
}
18+
table{
19+
font-size: 100%;
20+
border-collapse: collapse;
21+
border-spacing: 0;
22+
border: 0;
23+
width: 600px;
24+
background: #FFF;
25+
}
26+
table.contents {
27+
min-width: 100%;
28+
margin: 0 0 30px;
29+
color: #333;
30+
font-size: 16px;
31+
}
32+
table.contents th,
33+
table.contents td {
34+
padding: 15px 20px;
35+
border-bottom: #d6d6d6 1px solid;
36+
}
37+
table.contents th {
38+
white-space: nowrap;
39+
}
40+
.no-scroll {
41+
max-width: 600px;
42+
padding: 0 20px;
43+
}
44+
.scroll {
45+
max-width: 600px;
46+
overflow: scroll;
47+
padding: 0 20px;
48+
}
49+
.scroll table.contents {
50+
white-space: nowrap;
51+
}
52+
th {
53+
background-color: #efefef;
54+
font-weight: bold;
55+
text-align: left;
56+
}
57+
td {
58+
border-bottom: #e3e3e3 1px dotted;
59+
text-align: left;
60+
}
61+
h1.center,
62+
h2.center,
63+
h3.center,
64+
p.center{
65+
text-align: center;
66+
}
67+
h2 {
68+
margin: 0 20px 30px;
69+
padding: 0 0 15px;
70+
color: #333;
71+
font-size: 26px;
72+
border-bottom: 1px solid #77280e;
73+
}
74+
h3 {
75+
margin: 0 0 30px;
76+
color: #333;
77+
font-size: 23px;
78+
padding-right: 20px;
79+
padding-left: 20px;
80+
}
81+
p {
82+
margin: 0 0 30px;
83+
color: #333;
84+
padding-right: 20px;
85+
padding-left: 20px;
86+
font-size: 16px;
87+
}
88+
p.supplement {
89+
font-size: 12px;
90+
color: #606060;
91+
}
92+
ul,
93+
ol {
94+
margin: 0 20px 30px 20px;
95+
color: #333;
96+
font-size: 16px;
97+
}
98+
hr {
99+
border-top: 1px dashed #8c8b8b;
100+
margin: 40px 20px 40px;
101+
}
102+
img {
103+
max-width: 100%;
104+
height: auto;
105+
margin: 0 0 30px;
106+
}
107+
.center {
108+
text-align: center;
109+
}
110+
.red {
111+
color: #d14213;
112+
border-color: #d14213;
113+
}
114+
.btn {
115+
color: #FFF;
116+
background: #4D4D4D;
117+
display: block;
118+
padding: 15px 30px;
119+
box-sizing: border-box;
120+
border-radius: 5px;
121+
text-decoration: none;
122+
border-bottom: solid 2px #000;
123+
margin: 0 auto 30px;
124+
max-width: 250px;
125+
text-align: center;
126+
font-size: 22px;
127+
}
128+
.btn.red {
129+
background: #d14213;
130+
border-bottom: solid 2px #77280e;
131+
}
132+
address {
133+
padding: 0 20px 20px;
134+
}
135+
</style>
136+
</head>
137+
@endsection
138+
<body class="ze_body">
139+
<div class="container">
140+
<center>
141+
<table class="mail-body" cellpadding="0" cellspacing="0" border="0" width="600">
142+
<tbody>
143+
<tr>
144+
<td>
145+
@section("body")
146+
@endsection
147+
</td>
148+
</tr>
149+
</tbody>
150+
</table>
151+
</center>
152+
</div>
153+
</body>
154+
</html>
155+
156+
157+
158+

0 commit comments

Comments
 (0)