Repository navigation
131 lines (115 loc) · 4.38 KB
/
Copy pathandroid.yml
File metadata and controls
131 lines (115 loc) · 4.38 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Android CI/CD
# Main is always fully validated before publication. PRs use pr-builds.yml after review.
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: android-main
queue: max
cancel-in-progress: false
permissions:
contents: read
pull-requests: read
jobs:
build:
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/android-build.yml
secrets:
SIGNING_KEYSTORE_BASE64: ${{ secrets.SIGNING_KEYSTORE_BASE64 }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
presets:
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/preset-lab.yml
docs:
if: github.ref == 'refs/heads/main'
uses: ./.github/workflows/docs-build.yml
release:
name: Publish GitHub Release
needs: [build, presets, docs]
if: needs.build.outputs.release == 'true'
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: apk
path: dist
- uses: actions/download-artifact@v4
with:
name: core-aar
path: dist
- uses: actions/download-artifact@v4
with:
name: mapping
path: dist
- name: Write release notes from merged PRs
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.build.outputs.version }}
PREVIOUS_TAG: ${{ needs.build.outputs.previous_tag }}
run: >-
python3 .github/scripts/release_notes.py generate
--checkout . --repo "$GITHUB_REPOSITORY" --sha "$GITHUB_SHA"
--version "$VERSION" --previous-tag "$PREVIOUS_TAG" --output notes.md --with-fdroid
# The tag points at the version-declaring commit the artifacts were built from.
# It is rebuilt here byte-for-byte from main and never pushed to a branch.
- name: Tag the version-declaring release source
env:
VERSION: ${{ needs.build.outputs.version }}
VERSION_CODE: ${{ needs.build.outputs.version_code }}
RELEASE_SHA: ${{ needs.build.outputs.release_sha }}
run: >-
python3 .github/scripts/release_commit.py tag --repo . --source "$GITHUB_SHA"
--version "$VERSION" --version-code "$VERSION_CODE" --expected "$RELEASE_SHA"
- name: Publish complete signed artifacts
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.build.outputs.version }}
RELEASE_SHA: ${{ needs.build.outputs.release_sha }}
APK_NAME: ${{ needs.build.outputs.apk_name }}
ANDROID_APK_NAME: ${{ needs.build.outputs.android_apk_name }}
FDROID_TV_APK_NAME: ${{ needs.build.outputs.fdroid_tv_apk_name }}
FDROID_ANDROID_APK_NAME: ${{ needs.build.outputs.fdroid_android_apk_name }}
AAR_NAME: ${{ needs.build.outputs.aar_name }}
run: |
cp "dist/$APK_NAME" dist/projectM-TV.apk
cp "dist/$ANDROID_APK_NAME" dist/projectM-Android.apk
cp "dist/$FDROID_TV_APK_NAME" dist/projectM-TV-FDroid.apk
cp "dist/$FDROID_ANDROID_APK_NAME" dist/projectM-Android-FDroid.apk
cp "dist/$AAR_NAME" dist/projectM-TV-core.aar
python3 .github/scripts/publish_release.py publish --repo "$GITHUB_REPOSITORY" \
--version "$VERSION" --sha "$RELEASE_SHA" --notes notes.md --assets-dir dist --with-touchscreen --with-fdroid
fdroid:
name: Keep F-Droid submissions current
needs: [release]
uses: ./.github/workflows/fdroid-sync.yml
secrets:
FDROID_GITLAB_TOKEN: ${{ secrets.FDROID_GITLAB_TOKEN }}
milkbeat:
name: Rebuild Milkbeat with this core
needs: [build, release]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Update Milkbeat with this core
env:
GH_TOKEN: ${{ secrets.MILKBEAT_TOKEN }}
VERSION: ${{ needs.build.outputs.version }}
run: python3 .github/scripts/publish_release.py milkbeat --version "$VERSION"
deploy-guide:
if: github.ref == 'refs/heads/main'
needs: [build, presets, docs]
permissions:
contents: read
pages: write
id-token: write
uses: ./.github/workflows/pages-deploy.yml