mirror of
https://github.com/MaintainTeam/LastPipeBender.git
synced 2025-03-01 05:48:22 +03:00
Merge pull request #57 from thekyber/master (with some small changes)
This commit is contained in:
parent
c765e31aed
commit
ad42bf9713
3 changed files with 36 additions and 26 deletions
1
.github/changelog.md
vendored
Normal file
1
.github/changelog.md
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
## TODO: fill in
|
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
|
@ -2,11 +2,22 @@ name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
description: 'Title'
|
||||||
|
required: true
|
||||||
|
default: 'v0.00.0 R0'
|
||||||
|
is_pre_release:
|
||||||
|
type: boolean
|
||||||
|
description: 'Set as a pre-release'
|
||||||
|
required: true
|
||||||
|
default: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -15,7 +26,7 @@ jobs:
|
||||||
git clone --no-checkout https://github.com/polymorphicshade/Tubular.git .
|
git clone --no-checkout https://github.com/polymorphicshade/Tubular.git .
|
||||||
git config core.symlinks false
|
git config core.symlinks false
|
||||||
git checkout --progress --force ${{ github.ref_name }}
|
git checkout --progress --force ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
|
@ -23,21 +34,29 @@ jobs:
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
cache: 'gradle'
|
cache: 'gradle'
|
||||||
|
|
||||||
- name: Decode keystore
|
|
||||||
env:
|
|
||||||
ENCODED_STRING: ${{ secrets.KEYSTORE }}
|
|
||||||
run: |
|
|
||||||
echo $ENCODED_STRING | base64 -di > app/keystore.jks
|
|
||||||
|
|
||||||
- name: Build release APK
|
- name: Build release APK
|
||||||
env:
|
|
||||||
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
||||||
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
|
||||||
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
|
||||||
run: ./gradlew assembleRelease
|
run: ./gradlew assembleRelease
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Sign APK
|
||||||
|
env:
|
||||||
|
KEYSTORE: ${{ secrets.KEYSTORE }}
|
||||||
|
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
version=$( grep "versionName" app/build.gradle | awk -F'"' '{print $2}' )
|
||||||
|
echo "${KEYSTORE}" | base64 -d > apksign.keystore
|
||||||
|
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "app/build/outputs/apk/release/app-release-unsigned.apk"
|
||||||
|
mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/"tubular_v${version}.apk"
|
||||||
|
|
||||||
|
- name: Create release and upload
|
||||||
|
run: |
|
||||||
|
version=$( grep "versionName" app/build.gradle | awk -F'"' '{print $2}' )
|
||||||
|
gh auth login --with-token <<<"${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
gh release create "v${version}" --title "${{ inputs.title }}" --notes-file ".github/changelog.md" --prerelease=${{ inputs.is_pre_release }} --repo polymorphicshade/Tubular
|
||||||
|
gh release upload "v${version}" app/build/outputs/apk/release/*.apk --repo polymorphicshade/Tubular
|
||||||
|
|
||||||
|
- name: Archive reports for job
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: app
|
name: reports
|
||||||
path: app/build/outputs/apk/release/*.apk
|
path: '*/build/reports'
|
||||||
|
if: ${{ always() }}
|
||||||
|
|
|
@ -32,15 +32,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
|
||||||
release {
|
|
||||||
storeFile file("keystore.jks")
|
|
||||||
storePassword System.getenv("SIGNING_STORE_PASSWORD")
|
|
||||||
keyAlias System.getenv("SIGNING_KEY_ALIAS")
|
|
||||||
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
debuggable true
|
debuggable true
|
||||||
|
@ -60,7 +51,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
release {
|
release {
|
||||||
signingConfig signingConfigs.release
|
|
||||||
if (System.properties.containsKey('packageSuffix')) {
|
if (System.properties.containsKey('packageSuffix')) {
|
||||||
applicationIdSuffix System.getProperty('packageSuffix')
|
applicationIdSuffix System.getProperty('packageSuffix')
|
||||||
resValue "string", "app_name", "Tubular " + System.getProperty('packageSuffix')
|
resValue "string", "app_name", "Tubular " + System.getProperty('packageSuffix')
|
||||||
|
|
Loading…
Add table
Reference in a new issue