-
Notifications
You must be signed in to change notification settings - Fork 146
86 lines (69 loc) · 2.17 KB
/
build_foss.yml
File metadata and controls
86 lines (69 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build FOSS
run-name: foss @ ${{ github.sha }}
on:
workflow_dispatch:
concurrency: ${{ github.ref }}
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 18
- name: Export variables
run: |
python -u .github/scripts/resolve_paths.py -p >> $GITHUB_ENV
- name: Install dependencies
run: |
sudo pip install -r ${{ env.sd }}/requirements.txt
- name: Add new icons
run: |
python -u ${{ env.sd }}/add_icons_wrapper.py
- name: Set version
run: |
echo "filename=delta-${GITHUB_SHA::7}-foss" >> $GITHUB_ENV
python -u ${{ env.sd }}/bump_version.py -w \
-c "${GITHUB_SHA::7}|$(date +%s)"
- name: Set icon count
run: |
python ${{ env.sd }}/count_icons.py -w
- name: Create changelog
run: |
python ${{ env.sd }}/create_changelog.py -p -w -r foss \
-x app/src/main/res/values/changelog.xml
- name: Sort appfilter and drawable
run: |
cd ${{ env.sd }}
python sort_appfilter.py -o
python sort_drawable.py -o
cp -fv ${{ env.a1 }} ${{ env.a2 }}
cp -fv ${{ env.d1 }} ${{ env.a2 }}
- name: Build APK
run: |
bash gradlew assembleFoss
- name: Move unsigned APK
run: |
mv -v app/build/outputs/apk/foss/release/*.apk .
- name: Sign APK
uses: kevin-david/zipalign-sign-android-release@main
id: sign_step
with:
alias: ${{ secrets.KEYSTORE_KEY_ALIAS }}
keyPassword: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
signingKeyBase64: ${{ secrets.KEYSTORE_BASE64 }}
releaseDirectory: .
- name: Move signed APK
run: |
mv -v ${{ steps.sign_step.outputs.signedReleaseFile }} ${{ env.filename }}.apk
- name: Upload signed APK in Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.filename }}
path: ${{ env.filename }}.apk
retention-days: 7