Skip to content

Commit df56d53

Browse files
authored
Merge pull request #3 from Jusicool-Ver-2-0/feature/#2-File-Optimization
๐Ÿ”€ :: (#2) CI, CD ์ถ”๊ฐ€ ๋ฐ ํŒŒ์ผ ์ตœ์ ํ™”, ์•„์ด์ฝ˜ ์ถ”๊ฐ€
2 parents 5830810 + 984c452 commit df56d53

306 files changed

Lines changed: 1634 additions & 22675 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Bug
3+
about: ๋ฒ„๊ทธ ๋ฐœ์ƒ
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## ๐Ÿ“Œ ๊ฐœ์š”
11+
- ๋ฒ„๊ทธ๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ ์–ด์ฃผ์„ธ์š”.
12+
13+
## ๐Ÿ“š ๋ ˆํผ๋Ÿฐ์Šค (๋˜๋Š” ์ƒˆ๋กœ ์•Œ๊ฒŒ ๋œ ๋‚ด์šฉ) ํ˜น์€ ๊ถ๊ธˆํ•œ ์‚ฌํ•ญ๋“ค
14+
- ์ฐธ๊ณ ํ•  ์‚ฌํ•ญ์ด ์žˆ๋‹ค๋ฉด ์ ์–ด์ฃผ์„ธ์š”.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Feature
3+
about: ๊ธฐ๋Šฅ ์ถ”๊ฐ€
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## ๐Ÿ“Œ ๊ฐœ์š”
11+
- ํ•  ์ผ์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ ์–ด์ฃผ์„ธ์š”.
12+
13+
## ๐Ÿ“š ๋ ˆํผ๋Ÿฐ์Šค (๋˜๋Š” ์ƒˆ๋กœ ์•Œ๊ฒŒ ๋œ ๋‚ด์šฉ) ํ˜น์€ ๊ถ๊ธˆํ•œ ์‚ฌํ•ญ๋“ค
14+
- ์ฐธ๊ณ ํ•  ์‚ฌํ•ญ์ด ์žˆ๋‹ค๋ฉด ์ ์–ด์ฃผ์„ธ์š”.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## ๐Ÿ’ก ๊ฐœ์š”
2+
3+
## ๐Ÿ“ƒ ์ž‘์—…๋‚ด์šฉ
4+
5+
## ๐Ÿ”€ ๋ณ€๊ฒฝ์‚ฌํ•ญ
6+
7+
## ๐Ÿ™‹โ€โ™‚๏ธ ์งˆ๋ฌธ์‚ฌํ•ญ
8+
9+
## ๐Ÿด ์‚ฌ์šฉ๋ฐฉ๋ฒ•
10+
11+
## ๐ŸŽธ ๊ธฐํƒ€
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
name: Jusicool CD
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
branches:
8+
- master
9+
10+
jobs:
11+
flutter_test:
12+
name: Run flutter test and analyze
13+
runs-on: macos-latest
14+
steps:
15+
16+
- name: Checkout Flutter repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@v3.12.0
21+
with:
22+
distribution: 'oracle'
23+
java-version: '17'
24+
25+
- name: Setup Flutter
26+
uses: subosito/flutter-action@v2
27+
with:
28+
channel: 'stable'
29+
30+
- name: Checking Flutter Version
31+
run: flutter --version
32+
33+
34+
- name: Install Dependencies
35+
run: flutter pub get
36+
37+
- name: Analyze project source
38+
run: flutter analyze
39+
40+
- name: Build Test IOS
41+
run: flutter build ios --release --no-codesign
42+
43+
- name: Publish Design System
44+
uses: k-paxian/dart-package-publisher@master
45+
with:
46+
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
47+
flutter: true
48+
skipTests: true
49+
50+
- name: Set timestamp
51+
id: timestamp
52+
run: echo "TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
53+
54+
- name: Notify Success for Release
55+
if: success()
56+
env:
57+
TIMESTAMP: ${{ env.TIMESTAMP }}
58+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
59+
run: |
60+
DATA=$(cat <<EOF
61+
{
62+
"embeds": [
63+
{
64+
"title": "๋ฐฐํฌ ์„ฑ๊ณต :)",
65+
"description": "** Release Version **\n> \`${{ github.event.release.tag_name }}\`\n",
66+
"color": 46335,
67+
"timestamp": "${{ env.TIMESTAMP }}",
68+
"url": "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}",
69+
"author": {
70+
"name": "${{ github.event.sender.login }}",
71+
"url": "${{ github.event.sender.html_url }}",
72+
"icon_url": "${{ github.event.sender.avatar_url }}"
73+
},
74+
"thumbnail": {
75+
"url": "${{ github.event.sender.avatar_url }}"
76+
},
77+
"fields": [
78+
{
79+
"name": "Repository",
80+
"value": "> [${{ github.repository }}](https://github.com/${{ github.repository }})\n"
81+
},
82+
{
83+
"name": "Tag",
84+
"value": "> [${{ github.event.release.tag_name }}](https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }})",
85+
"inline": false
86+
},
87+
{
88+
"name": "Workflow",
89+
"value": "> [CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
90+
"inline": false
91+
}
92+
]
93+
}
94+
]
95+
}
96+
EOF
97+
)
98+
curl -X POST -H 'Content-type:application/json' -d "$DATA" "${{ secrets.DISCORD_WEBHOOK_URL }}"
99+
100+
- name: Notify Failure
101+
if: failure()
102+
env:
103+
TIMESTAMP: ${{ env.TIMESTAMP }}
104+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
105+
run: |
106+
DATA=$(cat <<EOF
107+
{
108+
"embeds": [
109+
{
110+
"title": "๋ฐฐํฌ ์‹คํŒจ :(",
111+
"description": "** Release Version **\n> \`${{ github.event.release.tag_name }}\`\n",
112+
"color": 16711680,
113+
"timestamp": "${{ env.TIMESTAMP }}",
114+
"url": "${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}",
115+
"author": {
116+
"name": "${{ github.event.sender.login }}",
117+
"url": "${{ github.event.sender.html_url }}"
118+
},
119+
"thumbnail": {
120+
"url": "${{ github.event.sender.avatar_url }}"
121+
},
122+
"fields": [
123+
{
124+
"name": "Repository",
125+
"value": "> [${{ github.repository }}](https://github.com/${{ github.repository }})\n"
126+
},
127+
{
128+
"name": "Tag",
129+
"value": "> [${{ github.event.release.tag_name }}](https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }})",
130+
"inline": false
131+
},
132+
{
133+
"name": "Workflow",
134+
"value": "> [CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
135+
"inline": false
136+
}
137+
]
138+
}
139+
]
140+
}
141+
EOF
142+
)
143+
curl -X POST -H 'Content-type:application/json' -d "$DATA" "${{ secrets.DISCORD_WEBHOOK_URL }}"
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
name: Jusicool CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
9+
jobs:
10+
flutter_test:
11+
name: Run flutter test and analyze
12+
runs-on: macos-latest
13+
steps:
14+
15+
- name: Checkout Flutter repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Java
19+
uses: actions/setup-java@v3.12.0
20+
with:
21+
distribution: 'oracle'
22+
java-version: '17'
23+
24+
- name: Setup Flutter
25+
uses: subosito/flutter-action@v2
26+
with:
27+
channel: 'stable'
28+
29+
- name: Checking Flutter Version
30+
run: flutter --version
31+
32+
- name: Install Dependencies
33+
run: flutter pub get
34+
35+
- name: Analyze project source
36+
run: flutter analyze
37+
38+
- name: Test Package
39+
run: flutter packages pub publish --dry-run
40+
41+
- name: Set timestamp
42+
id: timestamp
43+
run: echo "TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
44+
45+
- name: Notify Success for Push
46+
if: github.event_name == 'push' && success()
47+
env:
48+
TIMESTAMP: ${{ env.TIMESTAMP }}
49+
SUCCESS_FLUTTER_IMAGE: ${{ secrets.SUCCESS_FLUTTER_IMAGE }}
50+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
51+
run: |
52+
DATA=$(cat <<EOF
53+
{
54+
"content": "<@749992025985777755>, <@1055126447246823518>, <@1075320294446731326>",
55+
"embeds": [
56+
{
57+
"title": "CI ์„ฑ๊ณต :)",
58+
"description": "** COMMIT MESSAGE **\n> [${{ github.event.head_commit.message }}](${{ github.event.head_commit.url }})\n",
59+
"color": 46335,
60+
"timestamp": "${{ env.TIMESTAMP }}",
61+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
62+
"author": {
63+
"name": "${{ github.event.sender.login }}",
64+
"url": "${{ github.event.sender.html_url }}",
65+
"icon_url": "${{ github.event.sender.avatar_url }}"
66+
},
67+
"thumbnail": {
68+
"url": "${{ github.event.sender.avatar_url }}"
69+
},
70+
"fields": [
71+
{
72+
"name": "Repository",
73+
"value": "> [${{ github.repository }}](https://github.com/${{ github.repository }})\n"
74+
},
75+
{
76+
"name": "Branch",
77+
"value": "> [${{ github.ref }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }})",
78+
"inline": false
79+
},
80+
{
81+
"name": "Workflow",
82+
"value": "> [CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
83+
"inline": false
84+
}
85+
]
86+
}
87+
]
88+
}
89+
EOF
90+
)
91+
curl -X POST -H 'Content-type:application/json' -d "$DATA" "${{ secrets.DISCORD_WEBHOOK_URL }}"
92+
93+
- name: Notify Success for PR
94+
if: github.event_name == 'pull_request' && success()
95+
env:
96+
TIMESTAMP: ${{ env.TIMESTAMP }}
97+
SUCCESS_FLUTTER_IMAGE: ${{ secrets.SUCCESS_FLUTTER_IMAGE }}
98+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
99+
run: |
100+
DATA=$(cat <<EOF
101+
{
102+
"content": "<@749992025985777755>, <@1055126447246823518>, <@1075320294446731326>",
103+
"embeds": [
104+
{
105+
"title": "CI ์„ฑ๊ณต :)",
106+
"description": "** Pull Request **\n> [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})\n",
107+
"color": 46335,
108+
"timestamp": "${{ env.TIMESTAMP }}",
109+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
110+
"author": {
111+
"name": "${{ github.event.sender.login }}",
112+
"url": "${{ github.event.sender.html_url }}"
113+
},
114+
"thumbnail": {
115+
"url": "${{ github.event.sender.avatar_url }}"
116+
},
117+
"fields": [
118+
{
119+
"name": "Repository",
120+
"value": "> [${{ github.repository }}](https://github.com/${{ github.repository }})\n"
121+
},
122+
{
123+
"name": "Branch",
124+
"value": "> [${{ github.ref }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }})",
125+
"inline": false
126+
},
127+
{
128+
"name": "Workflow",
129+
"value": "> [CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
130+
"inline": false
131+
}
132+
]
133+
}
134+
]
135+
}
136+
EOF
137+
)
138+
curl -X POST -H 'Content-type:application/json' -d "$DATA" "${{ secrets.DISCORD_WEBHOOK_URL }}"
139+
140+
- name: Notify Failure
141+
if: failure()
142+
env:
143+
TIMESTAMP: ${{ env.TIMESTAMP }}
144+
FAIL_FLUTTER_IMAGE: ${{ secrets.FAIL_FLUTTER_IMAGE }}
145+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
146+
run: |
147+
DATA=$(cat <<EOF
148+
{
149+
"content": "<@749992025985777755>, <@1055126447246823518>, <@1075320294446731326>",
150+
"embeds": [
151+
{
152+
"title": "CI ์‹คํŒจ :(",
153+
"description": "** ${{
154+
github.event_name == 'push'
155+
&& 'COMMIT MESSAGE' || 'Pull Request' }} **\n> [${{
156+
github.event_name == 'push'
157+
&& github.event.head_commit.message ||
158+
github.event.pull_request.title }}](${{
159+
github.event_name == 'push'
160+
&& github.event.head_commit.url ||
161+
github.event.pull_request.html_url }})\n",
162+
"color": 16711680,
163+
"timestamp": "${{ env.TIMESTAMP }}",
164+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
165+
"author": {
166+
"name": "${{ github.event.sender.login }}",
167+
"url": "${{ github.event.sender.html_url }}"
168+
},
169+
"thumbnail": {
170+
"url": "${{ github.event.sender.avatar_url }}"
171+
},
172+
"fields": [
173+
{
174+
"name": "Repository",
175+
"value": "> [${{ github.repository }}](https://github.com/${{ github.repository }})\n"
176+
},
177+
{
178+
"name": "Branch",
179+
"value": "> [${{ github.ref }}](https://github.com/${{ github.repository }}/tree/${{ github.ref_name }})",
180+
"inline": false
181+
},
182+
{
183+
"name": "Workflow",
184+
"value": "> [CI](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})",
185+
"inline": false
186+
}
187+
]
188+
}
189+
]
190+
}
191+
EOF
192+
)
193+
curl -X POST -H 'Content-type:application/json' -d "$DATA" "${{ secrets.DISCORD_WEBHOOK_URL }}"

โ€ŽCHANGELOG.mdโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 1.0.0
2+
* Published initial version of the package.

0 commit comments

Comments
ย (0)