mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
Merge branch 'dev' into extended
- to fix .extended build
This commit is contained in:
commit
7923cbb58e
2 changed files with 25 additions and 10 deletions
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
|
@ -29,7 +29,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Create proper environment for multiple apk output
|
- name: Create proper environment for multiple apk output
|
||||||
run: |
|
run: |
|
||||||
apt install rename
|
|
||||||
mkdir -p "${{ github.workspace }}/output"
|
mkdir -p "${{ github.workspace }}/output"
|
||||||
|
|
||||||
if [[ "${{ inputs.style }}" -eq "1" ]]; then
|
if [[ "${{ inputs.style }}" -eq "1" ]]; then
|
||||||
|
@ -97,12 +96,14 @@ jobs:
|
||||||
echo "::notice::building master"
|
echo "::notice::building master"
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
|
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
|
||||||
|
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
|
||||||
|
|
||||||
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
|
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
|
||||||
cd "${{ github.workspace }}/extended/"
|
cd "${{ github.workspace }}/extended/"
|
||||||
echo "::notice::building extended"
|
echo "::notice::building extended"
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
mv "${{ github.workspace }}/extended/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/extended.apk"
|
mv "${{ github.workspace }}/extended/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/extended.apk"
|
||||||
|
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
|
||||||
|
|
||||||
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
|
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
|
||||||
echo "::notice::both master and extended are going to build"
|
echo "::notice::both master and extended are going to build"
|
||||||
|
@ -111,6 +112,7 @@ jobs:
|
||||||
echo "::notice::building master"
|
echo "::notice::building master"
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
|
mv "${{ github.workspace }}/master/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/master.apk"
|
||||||
|
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
|
||||||
|
|
||||||
cd "${{ github.workspace }}/extended"
|
cd "${{ github.workspace }}/extended"
|
||||||
echo "::notice::building extended"
|
echo "::notice::building extended"
|
||||||
|
@ -122,6 +124,7 @@ jobs:
|
||||||
echo "::notice::building current"
|
echo "::notice::building current"
|
||||||
./gradlew assembleRelease
|
./gradlew assembleRelease
|
||||||
mv "${{ github.workspace }}/current/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/current.apk"
|
mv "${{ github.workspace }}/current/app/build/outputs/apk/release/app-release-unsigned.apk" "${{ github.workspace }}/output/current.apk"
|
||||||
|
cp "./.github/changelog.md" "${{ github.workspace }}/output/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Sign APK
|
- name: Sign APK
|
||||||
|
@ -135,43 +138,50 @@ jobs:
|
||||||
if [[ "${{ inputs.style }}" -eq "1" ]]; then
|
if [[ "${{ inputs.style }}" -eq "1" ]]; then
|
||||||
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' )
|
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' )
|
||||||
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
|
||||||
|
mv "master.apk" "pipebender_v${version}.apk"
|
||||||
|
|
||||||
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
|
elif [[ "${{ inputs.style }}" -eq "2" ]]; then
|
||||||
version=$( grep "versionName" "${{ github.workspace }}/extended/app/build.gradle" | awk -F'"' '{print $2}' )
|
version=$( grep "versionName" "${{ github.workspace }}/extended/app/build.gradle" | awk -F'"' '{print $2}' )
|
||||||
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
|
||||||
|
mv "extended.apk" "pipebender_extended_v${version}.apk"
|
||||||
|
|
||||||
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
|
elif [[ "${{ inputs.style }}" -eq "3" ]]; then
|
||||||
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' ) # Use version of master app while both released !
|
version=$( grep "versionName" "${{ github.workspace }}/master/app/build.gradle" | awk -F'"' '{print $2}' ) # Use version of master app while both released !
|
||||||
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./master.apk"
|
||||||
|
mv "master.apk" "pipebender_v${version}.apk"
|
||||||
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./extended.apk"
|
||||||
|
mv "extended.apk" "pipebender_extended_v${version}.apk"
|
||||||
|
|
||||||
else
|
else
|
||||||
mkdir "${{ github.workspace }}/current"
|
mkdir "${{ github.workspace }}/current"
|
||||||
version=$( grep "versionName" "${{ github.workspace }}/current/app/build.gradle" | awk -F'"' '{print $2}' )
|
version=$( grep "versionName" "${{ github.workspace }}/current/app/build.gradle" | awk -F'"' '{print $2}' )
|
||||||
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./current.apk"
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "./current.apk"
|
||||||
|
mv "current.apk" "pipebender_v${version}.apk"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rename "master" "pipebender_v${version}"
|
echo ${version} > version.num
|
||||||
rename "extended" "pipebender_v${version}-e"
|
|
||||||
rename "current" "pipebender_v${version}"
|
|
||||||
ls -la
|
ls -la
|
||||||
|
|
||||||
- name: Generate checksum
|
- name: Generate checksum
|
||||||
run: |
|
run: |
|
||||||
cd "${{ github.workspace }}/output/"
|
cd "${{ github.workspace }}/output/"
|
||||||
sha256sum *.apk > ./checksums.txt
|
find . -name '*.apk' -type f -exec sha256sum {} \; > checksums.txt
|
||||||
echo "::notice::$(cat ./checksums.txt)"
|
echo "::notice::$(echo $(cat ./checksums.txt))"
|
||||||
|
ls -la
|
||||||
|
|
||||||
|
|
||||||
- name: Create release and upload
|
- name: Create release and upload
|
||||||
run: |
|
run: |
|
||||||
gh auth login --with-token <<<"${{ secrets.GITHUB_TOKEN }}"
|
gh auth login --with-token <<<"${{ secrets.GITHUB_TOKEN }}"
|
||||||
gh release create "v${version}" --title "${{ inputs.title }}" --notes-file ".github/changelog.md" --prerelease="true" --repo MaintainTeam/LastPipeBender
|
cd "${{ github.workspace }}/output/"
|
||||||
gh release upload "v${version}" "${{ github.workspace }}/output/{*.apk,checksums.txt}" --repo MaintainTeam/LastPipeBender
|
version=$(cat version.num)
|
||||||
|
echo $version
|
||||||
|
gh release create "v${version}" --title "${{ inputs.title }}" --notes-file "./changelog.md" --prerelease="true" --repo MaintainTeam/LastPipeBender
|
||||||
|
gh release upload "v${version}" $(echo $(find . -name '*.apk' -type f -exec basename \{} \;) checksums.txt) --repo MaintainTeam/LastPipeBender
|
||||||
|
|
||||||
- name: Archive reports for job
|
- name: Archive reports for job
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: reports
|
name: reports
|
||||||
path: '*/build/reports'
|
path: '*/build/reports'
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
|
@ -58,7 +58,12 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
if (System.properties.containsKey('packageSuffix')) {
|
if (getGitWorkingBranch() == "extended") {
|
||||||
|
applicationIdSuffix ".extended"
|
||||||
|
resValue "string", "app_name", "PipeBender Extended"
|
||||||
|
archivesBaseName = 'PipeBenderExtended_'
|
||||||
|
}
|
||||||
|
else if (System.properties.containsKey('packageSuffix')) {
|
||||||
applicationIdSuffix System.getProperty('packageSuffix')
|
applicationIdSuffix System.getProperty('packageSuffix')
|
||||||
resValue "string", "app_name", "PipeBender " + System.getProperty('packageSuffix')
|
resValue "string", "app_name", "PipeBender " + System.getProperty('packageSuffix')
|
||||||
archivesBaseName = 'PipeBender_' + System.getProperty('packageSuffix')
|
archivesBaseName = 'PipeBender_' + System.getProperty('packageSuffix')
|
||||||
|
|
Loading…
Add table
Reference in a new issue