chore: Update artifact upload action version and bump version on release
This commit is contained in:
parent
4730813ff0
commit
69ac19ade2
2 changed files with 23 additions and 3 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
|
@ -41,13 +41,13 @@ jobs:
|
||||||
run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk
|
run: mv /tmp/pyonbuild/apks/app-release-aligned-debugSigned.apk /tmp/pyonbuild/apks/app-release.apk
|
||||||
|
|
||||||
- name: "Upload debug APK"
|
- name: "Upload debug APK"
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: app-debug
|
name: app-debug
|
||||||
path: /tmp/pyonbuild/apks/app-debug.apk
|
path: /tmp/pyonbuild/apks/app-debug.apk
|
||||||
|
|
||||||
- name: "Upload release APK"
|
- name: "Upload release APK"
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: app-release
|
name: app-release
|
||||||
path: /tmp/pyonbuild/apks/app-release.apk
|
path: /tmp/pyonbuild/apks/app-release.apk
|
||||||
22
.github/workflows/release.yml
vendored
22
.github/workflows/release.yml
vendored
|
|
@ -11,6 +11,9 @@ on:
|
||||||
description: This releases version code
|
description: This releases version code
|
||||||
default: "1000"
|
default: "1000"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -35,11 +38,28 @@ jobs:
|
||||||
versionCode: ${{github.event.inputs.versionCode}}
|
versionCode: ${{github.event.inputs.versionCode}}
|
||||||
versionName: ${{github.event.inputs.versionName}}
|
versionName: ${{github.event.inputs.versionName}}
|
||||||
|
|
||||||
|
- name: Bump Version
|
||||||
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
git config --local user.email "actions@github.com"
|
||||||
|
git config --local user.name "GitHub Actions"
|
||||||
|
git add app/build.gradle.kts
|
||||||
|
if ! git diff --quiet app/build.gradle.kts; then
|
||||||
|
git commit -m "chore: Bump version to ${{github.event.inputs.versionName}} (${{github.event.inputs.versionCode}})"
|
||||||
|
git push
|
||||||
|
else
|
||||||
|
echo "No changes to version file, skipping commit"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Build Signed APK
|
- name: Build Signed APK
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.keystore }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
|
echo "${{ secrets.keystore }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
./gradlew packageReleaseUniversalApk -Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks -Pandroid.injected.signing.store.password=${{ secrets.keystore_password }} -Pandroid.injected.signing.key.alias=${{ secrets.key_alias }} -Pandroid.injected.signing.key.password=${{ secrets.key_password }}
|
./gradlew packageReleaseUniversalApk \
|
||||||
|
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks \
|
||||||
|
-Pandroid.injected.signing.store.password=${{ secrets.keystore_password }} \
|
||||||
|
-Pandroid.injected.signing.key.alias=${{ secrets.key_alias }} \
|
||||||
|
-Pandroid.injected.signing.key.password=${{ secrets.key_password }}
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue