adding automatic foss apk uploading to the release
This commit is contained in:
parent
6df204009e
commit
40222b5ea3
|
@ -34,11 +34,14 @@ jobs:
|
||||||
touch .secrets/service-account.json
|
touch .secrets/service-account.json
|
||||||
touch .secrets/matrix.json
|
touch .secrets/matrix.json
|
||||||
echo -n '${{ secrets.UPLOAD_KEY }}' | base64 --decode >> .secrets/upload-key.jks
|
echo -n '${{ secrets.UPLOAD_KEY }}' | base64 --decode >> .secrets/upload-key.jks
|
||||||
|
echo -n '${{ secrets.FDROID_KEY }}' | base64 --decode >> .secrets/fdroid.keystore
|
||||||
echo -n '${{ secrets.SERVICE_ACCOUNT }}' | base64 --decode >> .secrets/service-account.json
|
echo -n '${{ secrets.SERVICE_ACCOUNT }}' | base64 --decode >> .secrets/service-account.json
|
||||||
echo -n '${{ secrets.MATRIX }}' | base64 --decode >> .secrets/matrix.json
|
echo -n '${{ secrets.MATRIX }}' | base64 --decode >> .secrets/matrix.json
|
||||||
|
|
||||||
- name: Assemble release variant
|
- name: Assemble release variant
|
||||||
run: ./tools/generate-release.sh ${{ secrets.STORE_PASS }}
|
run: |
|
||||||
|
./tools/generate-release.sh ${{ secrets.STORE_PASS }}
|
||||||
|
./tools/generate-fdroid-release.sh ${{ secrets.FDROID_STORE_PASS }}
|
||||||
|
|
||||||
- uses: actions/github-script@v6
|
- uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
|
@ -48,6 +51,7 @@ jobs:
|
||||||
const artifacts = {
|
const artifacts = {
|
||||||
bundle: '${{ github.workspace }}/app/build/outputs/bundle/release/app-release.aab',
|
bundle: '${{ github.workspace }}/app/build/outputs/bundle/release/app-release.aab',
|
||||||
mapping: '${{ github.workspace }}/app/build/outputs/mapping/release/mapping.txt',
|
mapping: '${{ github.workspace }}/app/build/outputs/mapping/release/mapping.txt',
|
||||||
|
fossApkPath: '${{ github.workspace }}/app/build/outputs/apk/release/app-foss-release-signed.apk',
|
||||||
}
|
}
|
||||||
await publishRelease(github, artifacts)
|
await publishRelease(github, artifacts)
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ export const release = async (github, version, applicationId, artifacts, config)
|
||||||
|
|
||||||
console.log(releaseResult.data.id)
|
console.log(releaseResult.data.id)
|
||||||
|
|
||||||
|
console.log("Uploading universal apk...")
|
||||||
await github.rest.repos.uploadReleaseAsset({
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
owner: config.owner,
|
owner: config.owner,
|
||||||
repo: config.repo,
|
repo: config.repo,
|
||||||
|
@ -64,6 +65,15 @@ export const release = async (github, version, applicationId, artifacts, config)
|
||||||
data: fs.readFileSync(universalApkPath)
|
data: fs.readFileSync(universalApkPath)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log("Uploading foss apk...")
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
owner: config.owner,
|
||||||
|
repo: config.repo,
|
||||||
|
release_id: releaseResult.data.id,
|
||||||
|
name: `foss-signed-${version.name}.apk`,
|
||||||
|
data: fs.readFileSync(artifacts.fossApkPath)
|
||||||
|
})
|
||||||
|
|
||||||
console.log("Promoting beta draft release to live...")
|
console.log("Promoting beta draft release to live...")
|
||||||
await promoteDraftToLive(applicationId)
|
await promoteDraftToLive(applicationId)
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ SIGNED=$WORKING_DIR/app-foss-release-signed.apk
|
||||||
ZIPALIGN=$(find "$ANDROID_HOME" -iname zipalign -print -quit)
|
ZIPALIGN=$(find "$ANDROID_HOME" -iname zipalign -print -quit)
|
||||||
APKSIGNER=$(find "$ANDROID_HOME" -iname apksigner -print -quit)
|
APKSIGNER=$(find "$ANDROID_HOME" -iname apksigner -print -quit)
|
||||||
|
|
||||||
./gradlew clean assembleRelease -Pfoss -Punsigned --no-daemon --no-configuration-cache --no-build-cache
|
./gradlew assembleRelease -Pfoss -Punsigned --no-daemon --no-configuration-cache --no-build-cache
|
||||||
|
|
||||||
$ZIPALIGN -v -p 4 $UNSIGNED $ALIGNED_UNSIGNED
|
$ZIPALIGN -v -p 4 $UNSIGNED $ALIGNED_UNSIGNED
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
./gradlew clean bundleRelease -Punsigned --no-daemon --no-configuration-cache --no-build-cache
|
./gradlew bundleRelease -Punsigned --no-daemon --no-configuration-cache --no-build-cache
|
||||||
|
|
||||||
WORKING_DIR=app/build/outputs/bundle/release
|
WORKING_DIR=app/build/outputs/bundle/release
|
||||||
RELEASE_AAB=$WORKING_DIR/app-release.aab
|
RELEASE_AAB=$WORKING_DIR/app-release.aab
|
||||||
|
|
Loading…
Reference in New Issue