Skip to content

Commit b7d167d

Browse files
authored
reorganize repo, optimize workflows and fix some icons (#1291)
* fix tiktok icon * remove resolve_paths.sh; rename readme file to render it on GitHub * reorganize repo * add carbitlink
1 parent 4e68faf commit b7d167d

33 files changed

+161
-169
lines changed

.github/scripts/optimize_images.sh

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

.github/scripts/resolve_paths.sh

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

.github/workflows/build_all.yml

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Build All
22
run-name: ${{ inputs.release_type }} @ ${{ github.sha }}
33

4-
permissions:
5-
contents: write
6-
74
concurrency:
85
group: delta
96

7+
permissions:
8+
contents: write
9+
1010
on:
1111
workflow_dispatch:
1212
inputs:
@@ -36,11 +36,10 @@ on:
3636
changelog:
3737
description: Changelog (b64 encoded)
3838

39-
4039
env:
4140
token: ${{ secrets.PA_TOKEN || github.token }}
42-
organization: Delta-Icons
4341
current_repo: ${{ github.repository }}
42+
organization: Delta-Icons
4443
website_repo: Delta-Icons/delta-icons.github.io
4544
package_name: website.leifs.delta
4645

@@ -51,26 +50,43 @@ jobs:
5150
steps:
5251

5352
- name: Checkout
54-
uses: actions/checkout@v4
53+
uses: actions/checkout@v5
5554
with:
5655
token: ${{ env.token }}
5756
fetch-depth: 0
5857

59-
- name: Export variables
60-
run: |
61-
python -u .github/scripts/resolve_paths.py -p >> $GITHUB_ENV
58+
- name: Setup Gradle
59+
uses: gradle/actions/setup-gradle@v5
60+
with:
61+
add-job-summary: never
6262

6363
- name: Setup Java
64-
uses: actions/setup-java@v4
64+
uses: actions/setup-java@v5
6565
with:
66+
cache: gradle
6667
distribution: temurin
6768
java-version: 18
6869

69-
- name: Install dependencies
70+
- name: Setup Python
71+
uses: actions/setup-python@v6
72+
with:
73+
cache: pip
74+
python-version: '3.13'
75+
76+
- name: Export vars
7077
run: |
71-
sudo apt-get update
72-
sudo apt-get install -y optipng
73-
sudo pip install -r ${{ env.sd }}/requirements.txt
78+
python -u resources/scripts/resolve_paths.py -p >> $GITHUB_ENV
79+
due_on=$(TZ=UTC date --iso-8601=seconds -d "$(date +%Y-%m-01) +1 month") >> $GITHUB_ENV
80+
81+
- name: Install Python deps
82+
run: |
83+
pip install -r ${{ env.sd }}/requirements.txt
84+
85+
- name: Install Linux deps
86+
uses: awalsh128/cache-apt-pkgs-action@latest
87+
with:
88+
packages: optipng
89+
version: 1.0
7490

7591
- name: Configure tools
7692
run: |
@@ -87,19 +103,26 @@ jobs:
87103
-r ${{ inputs.release_type }} \
88104
-v ${{ inputs.version_type }} >> $GITHUB_ENV
89105
90-
- name: Add new icons
106+
- name: Add icons
91107
run: |
92108
python -u ${{ env.sd }}/add_icons_wrapper.py
93109
94-
- name: Set icon count
110+
- name: Set icons count
95111
run: |
96112
python ${{ env.sd }}/count_icons.py -w
97113
98114
- name: Optimize images
99115
run: |
100-
bash ${{ env.sd }}/optimize_images.sh
116+
latest_tag=$(git tag --sort version:refname | grep -v 'beta' | tail -n 1)
117+
changes=$(git diff --name-only $latest_tag -- "***.png")
118+
if [[ $latest_tag && $changes ]]; then
119+
echo "Latest tag is $latest_tag; optimizing images since this tag"
120+
optipng $changes || true
121+
else
122+
echo 'No release tag or changed files found, skip optimizing'
123+
fi
101124
102-
- name: Sort appfilter and drawable
125+
- name: Sort XMLs
103126
run: |
104127
cd ${{ env.sd }}
105128
python sort_appfilter.py -o
@@ -125,7 +148,7 @@ jobs:
125148
126149
echo "changelog=$changelog_tmp" >> $GITHUB_ENV
127150
128-
- name: Commit pre-build changes
151+
- name: Commit pre-release changes
129152
run: |
130153
git add \
131154
app/build.gradle \
@@ -178,15 +201,15 @@ jobs:
178201
mv -v *play*.apk ${{ env.filename }}.apk 2> /dev/null || true
179202
mv -v *play*.aab ${{ env.filename }}.aab 2> /dev/null || true
180203
181-
- name: Upload APKs to Artifacts
182-
uses: actions/upload-artifact@v4
204+
- name: Upload signed builds to Artifacts
205+
uses: actions/upload-artifact@v5
183206
with:
184207
name: ${{ env.filename }}
185208
path: ${{ env.filename }}*.apk
186209
if-no-files-found: error
187-
retention-days: 90
210+
retention-days: 30
188211

189-
- name: Push pre-build changes
212+
- name: Push pre-release changes
190213
uses: ad-m/github-push-action@master
191214
with:
192215
github_token: ${{ env.token }}
@@ -238,7 +261,7 @@ jobs:
238261
github.repository_owner == env.organization &&
239262
inputs.publish == true
240263
241-
- name: Update the requests list
264+
- name: Update requests
242265
uses: benc-uk/workflow-dispatch@v1
243266
with:
244267
repo: ${{ github.repository }}
@@ -248,7 +271,7 @@ jobs:
248271
github.repository_owner == env.organization &&
249272
inputs.publish == true
250273
251-
- name: Promote beta to production channel
274+
- name: Promote Google Play beta to production
252275
uses: kevin-david/promote-play-release@v1.1.0
253276
with:
254277
service-account-json-raw: ${{ secrets.SERVICE_ACCOUNT }}
@@ -260,7 +283,7 @@ jobs:
260283
inputs.release_type == 'prod' &&
261284
inputs.publish == true
262285
263-
- name: Update the website
286+
- name: Update website
264287
uses: benc-uk/workflow-dispatch@v1
265288
with:
266289
token: ${{ env.token }}
@@ -271,10 +294,11 @@ jobs:
271294
inputs.release_type == 'prod' &&
272295
inputs.publish == true
273296
274-
- name: Close the current milestone
297+
- name: Close current milestone
275298
uses: oinume/create-scheduled-milestone-action@main
299+
continue-on-error: true
276300
with:
277-
title: ${{ env.version }}
301+
title: ${{ env.version_name }}
278302
state: closed
279303
env:
280304
GITHUB_TOKEN: ${{ env.token }}
@@ -283,11 +307,13 @@ jobs:
283307
inputs.release_type == 'prod' &&
284308
inputs.publish == true
285309
286-
- name: Open a new milestone
310+
- name: Open new milestone
287311
uses: oinume/create-scheduled-milestone-action@main
312+
continue-on-error: true
288313
with:
289314
title: ${{ env.version_next }}
290315
state: open
316+
due_on: '${{ env.due_on }}'
291317
env:
292318
GITHUB_TOKEN: ${{ env.token }}
293319
if: |

.github/workflows/build_foss.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
name: Build FOSS
22
run-name: foss @ ${{ github.sha }}
33

4+
concurrency:
5+
group: delta
6+
47
on:
58
workflow_dispatch:
69

7-
concurrency: ${{ github.ref }}
8-
910
jobs:
1011
build:
1112
name: Build
1213
runs-on: ubuntu-22.04
1314
steps:
1415

1516
- name: Checkout
16-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1718

19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v5
21+
with:
22+
add-job-summary: never
23+
1824
- name: Setup Java
19-
uses: actions/setup-java@v4
25+
uses: actions/setup-java@v5
2026
with:
27+
cache: gradle
2128
distribution: temurin
2229
java-version: 18
2330

24-
- name: Export variables
31+
- name: Setup Python
32+
uses: actions/setup-python@v6
33+
with:
34+
cache: pip
35+
python-version: '3.13'
36+
37+
- name: Export vars
2538
run: |
26-
python -u .github/scripts/resolve_paths.py -p >> $GITHUB_ENV
39+
python -u resources/scripts/resolve_paths.py -p >> $GITHUB_ENV
2740
28-
- name: Install dependencies
41+
- name: Install Python deps
2942
run: |
30-
sudo pip install -r ${{ env.sd }}/requirements.txt
43+
pip install -r ${{ env.sd }}/requirements.txt
3144
32-
- name: Add new icons
45+
- name: Add icons
3346
run: |
3447
python -u ${{ env.sd }}/add_icons_wrapper.py
3548
@@ -39,16 +52,16 @@ jobs:
3952
python -u ${{ env.sd }}/bump_version.py -w \
4053
-c "${GITHUB_SHA::7}|$(date +%s)"
4154
42-
- name: Set icon count
55+
- name: Set icons count
4356
run: |
4457
python ${{ env.sd }}/count_icons.py -w
4558
4659
- name: Create changelog
4760
run: |
48-
python ${{ env.sd }}/create_changelog.py -p -w -r foss \
49-
-x app/src/main/res/values/changelog.xml
61+
python ${{ env.sd }}/create_changelog.py \
62+
-p -w -r foss -x app/src/main/res/values/changelog.xml
5063
51-
- name: Sort appfilter and drawable
64+
- name: Sort XMLs
5265
run: |
5366
cd ${{ env.sd }}
5467
python sort_appfilter.py -o
@@ -74,12 +87,12 @@ jobs:
7487
signingKeyBase64: ${{ secrets.KEYSTORE_BASE64 }}
7588
releaseDirectory: .
7689

77-
- name: Move signed APK
90+
- name: Rename signed APK
7891
run: |
7992
mv -v ${{ steps.sign_step.outputs.signedReleaseFile }} ${{ env.filename }}.apk
8093
81-
- name: Upload signed APK in Artifacts
82-
uses: actions/upload-artifact@v4
94+
- name: Upload signed APK to Artifacts
95+
uses: actions/upload-artifact@v5
8396
with:
8497
name: ${{ env.filename }}
8598
path: ${{ env.filename }}.apk

.github/workflows/check_conflicts.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
1-
name: Check Conflicts
1+
name: Check for Conflicts
22
run-name: conflicts @ ${{ github.sha }}
33

44
on:
55
workflow_dispatch:
6-
pull_request:
6+
pull_requests:
77
paths:
8-
- app/src/main/rec/drawable-nodpi/**
98
- contribs/**
109

1110
jobs:
1211
build:
13-
name: Check Conflicts
12+
name: Check for Conflicts
1413
runs-on: ubuntu-22.04
1514
defaults:
1615
run:
17-
working-directory: .github/scripts
16+
working-directory: resources/scripts
1817
steps:
1918

2019
- name: Checkout
21-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2221

2322
- name: Setup Python
24-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@v6
2524
with:
26-
python-version: '3.10'
25+
python-version: '3.13'
2726
cache: pip
2827

29-
- name: Install dependencies
28+
- name: Install Python deps
3029
run: |
31-
python -m pip install -r requirements.txt
30+
pip install -r requirements.txt
3231
3332
- name: Add icons
3433
run: |

0 commit comments

Comments
 (0)