29
29
steps :
30
30
- name : Create proper environment for multiple apk output
31
31
run : |
32
- apt install rename
33
32
mkdir -p "${{ github.workspace }}/output"
34
33
35
34
if [[ "${{ inputs.style }}" -eq "1" ]]; then
@@ -97,12 +96,14 @@ jobs:
97
96
echo "::notice::building master"
98
97
./gradlew assembleRelease
99
98
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/"
100
100
101
101
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
102
102
cd "${{ github.workspace }}/extended/"
103
103
echo "::notice::building extended"
104
104
./gradlew assembleRelease
105
105
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/"
106
107
107
108
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
108
109
echo "::notice::both master and extended are going to build"
@@ -111,6 +112,7 @@ jobs:
111
112
echo "::notice::building master"
112
113
./gradlew assembleRelease
113
114
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/"
114
116
115
117
cd "${{ github.workspace }}/extended"
116
118
echo "::notice::building extended"
@@ -122,6 +124,7 @@ jobs:
122
124
echo "::notice::building current"
123
125
./gradlew assembleRelease
124
126
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/"
125
128
fi
126
129
127
130
- name : Sign APK
@@ -135,43 +138,50 @@ jobs:
135
138
if [[ "${{ inputs.style }}" -eq "1" ]]; then
136
139
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' )
137
140
${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"
138
142
139
143
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
140
144
version=$( grep "versionName" "${{ github.workspace }}/extended/app/build.gradle" | awk -F'"' '{print $2}' )
141
145
${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"
142
147
143
148
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
144
149
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' ) # Use version of master app while both released !
145
150
${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"
146
152
${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"
147
154
148
155
else
149
156
mkdir "${{ github.workspace }}/current"
150
157
version=$( grep "versionName" "${{ github.workspace }}/current/app/build.gradle" | awk -F'"' '{print $2}' )
151
158
${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"
152
160
fi
153
161
154
- rename "master" "pipebender_v${version}"
155
- rename "extended" "pipebender_v${version}-e"
156
- rename "current" "pipebender_v${version}"
162
+ echo ${version} > version.num
157
163
ls -la
158
164
159
165
- name : Generate checksum
160
166
run : |
161
167
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
164
171
165
172
166
173
- name : Create release and upload
167
174
run : |
168
175
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
171
181
172
182
- name : Archive reports for job
173
183
uses : actions/upload-artifact@v4
174
184
with :
175
185
name : reports
176
186
path : ' */build/reports'
177
- if : ${{ always() }}
187
+ if : ${{ always() }}
0 commit comments