Skip to content

Commit 7923cbb

Browse files
committed
Merge branch 'dev' into extended
- to fix .extended build
2 parents dfc1063 + 855754c commit 7923cbb

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

.github/workflows/release.yml

+19-9
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
steps:
3030
- name: Create proper environment for multiple apk output
3131
run: |
32-
apt install rename
3332
mkdir -p "${{ github.workspace }}/output"
3433
3534
if [[ "${{ inputs.style }}" -eq "1" ]]; then
@@ -97,12 +96,14 @@ jobs:
9796
echo "::notice::building master"
9897
./gradlew assembleRelease
9998
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
99+
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
100100
101101
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
102102
cd "${{ github.workspace }}/extended/"
103103
echo "::notice::building extended"
104104
./gradlew assembleRelease
105105
mv "${{ github.workspace }}/extended/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/extended.apk"
106+
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
106107
107108
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
108109
echo "::notice::both master and extended are going to build"
@@ -111,6 +112,7 @@ jobs:
111112
echo "::notice::building master"
112113
./gradlew assembleRelease
113114
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
115+
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
114116
115117
cd "${{ github.workspace }}/extended"
116118
echo "::notice::building extended"
@@ -122,6 +124,7 @@ jobs:
122124
echo "::notice::building current"
123125
./gradlew assembleRelease
124126
mv "${{ github.workspace }}/current/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/current.apk"
127+
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
125128
fi
126129
127130
- name: Sign APK
@@ -135,43 +138,50 @@ jobs:
135138
if [[ "${{ inputs.style }}" -eq "1" ]]; then
136139
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' )
137140
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
141+
mv "master.apk" "pipebender_v${version}.apk"
138142
139143
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
140144
version=$( grep "versionName" "${{ github.workspace }}/extended/app/build.gradle" | awk -F'"' '{print $2}' )
141145
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
146+
mv "extended.apk" "pipebender_extended_v${version}.apk"
142147
143148
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
144149
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' ) # Use version of master app while both released !
145150
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
151+
mv "master.apk" "pipebender_v${version}.apk"
146152
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
153+
mv "extended.apk" "pipebender_extended_v${version}.apk"
147154
148155
else
149156
mkdir "${{ github.workspace }}/current"
150157
version=$( grep "versionName" "${{ github.workspace }}/current/app/build.gradle" | awk -F'"' '{print $2}' )
151158
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./current.apk"
159+
mv "current.apk" "pipebender_v${version}.apk"
152160
fi
153161
154-
rename "master" "pipebender_v${version}"
155-
rename "extended" "pipebender_v${version}-e"
156-
rename "current" "pipebender_v${version}"
162+
echo ${version} > version.num
157163
ls -la
158164
159165
- name: Generate checksum
160166
run: |
161167
cd "${{ github.workspace }}/output/"
162-
sha256sum *.apk > ./checksums.txt
163-
echo "::notice::$(cat ./checksums.txt)"
168+
find . -name '*.apk' -type f -exec sha256sum {} \; > checksums.txt
169+
echo "::notice::$(echo $(cat ./checksums.txt))"
170+
ls -la
164171
165172
166173
- name: Create release and upload
167174
run: |
168175
gh auth login --with-token <<<"${{ secrets.GITHUB_TOKEN }}"
169-
gh release create "v${version}" --title "${{ inputs.title }}" --notes-file ".github/changelog.md" --prerelease="true" --repo MaintainTeam/LastPipeBender
170-
gh release upload "v${version}" "${{ github.workspace }}/output/{*.apk,checksums.txt}" --repo MaintainTeam/LastPipeBender
176+
cd "${{ github.workspace }}/output/"
177+
version=$(cat version.num)
178+
echo $version
179+
gh release create "v${version}" --title "${{ inputs.title }}" --notes-file "./changelog.md" --prerelease="true" --repo MaintainTeam/LastPipeBender
180+
gh release upload "v${version}" $(echo $(find . -name '*.apk' -type f -exec basename \{} \;) checksums.txt) --repo MaintainTeam/LastPipeBender
171181
172182
- name: Archive reports for job
173183
uses: actions/upload-artifact@v4
174184
with:
175185
name: reports
176186
path: '*/build/reports'
177-
if: ${{ always() }}
187+
if: ${{ always() }}

app/build.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ android {
5858
}
5959

6060
release {
61-
if (System.properties.containsKey('packageSuffix')) {
61+
if (getGitWorkingBranch() == "extended") {
62+
applicationIdSuffix ".extended"
63+
resValue "string", "app_name", "PipeBender Extended"
64+
archivesBaseName = 'PipeBenderExtended_'
65+
}
66+
else if (System.properties.containsKey('packageSuffix')) {
6267
applicationIdSuffix System.getProperty('packageSuffix')
6368
resValue "string", "app_name", "PipeBender " + System.getProperty('packageSuffix')
6469
archivesBaseName = 'PipeBender_' + System.getProperty('packageSuffix')

0 commit comments

Comments
 (0)