forked from Docile-Alligator/Infinity-For-Reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
65 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,57 @@ | ||
name: Build | ||
# This workflow will build the APK using JDK when a commit is pushed or a pull request is opened | ||
|
||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
Build: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set-up JDK 11 | ||
- name: Setup JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Setup and build with Gradle | ||
- name: Prepare for signing | ||
run: | | ||
echo "${{secrets.RELEASE_KEYSTORE}}" > infinity.jks.asc | ||
gpg -d --passphrase "${{secrets.RELEASE_KEYSTORE_PASSPHRASE}}" --batch infinity.jks.asc > ${{github.workspace}}/infinity.jks | ||
- name: Build with Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build -x lint | ||
arguments: > | ||
assembleMinifiedRelease | ||
-Pandroid.injected.signing.store.file=${{github.workspace}}/infinity.jks | ||
-Pandroid.injected.signing.store.password=${{secrets.RELEASE_KEYSTORE_PW}} | ||
-Pandroid.injected.signing.key.alias=adanski-infinity | ||
-Pandroid.injected.signing.key.password=${{secrets.RELEASE_KEYSTORE_PW}} | ||
- name: Rename APK and generate checksum | ||
run: | | ||
cd app/build/outputs/apk/minifiedRelease | ||
find -name "*.apk" -exec mv '{}' infinity-personal-${{github.ref_name}}.apk \; -quit | ||
sha256sum infinity-personal-${{github.ref_name}}.apk > infinity-personal-${{github.ref_name}}.apk.sha256 | ||
cd ${{github.workspace}} | ||
- name: Upload apk | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Infinity-${{github.sha}} | ||
path: app/build/outputs/apk/ | ||
name: infinity-personal-${{github.ref_name}} | ||
path: | | ||
app/build/outputs/apk/minifiedRelease/*.apk | ||
app/build/outputs/apk/minifiedRelease/*.apk.sha256 | ||
if-no-files-found: error | ||
retention-days: 7 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflow will publish the APK as a GitHub release | ||
|
||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
secrets: inherit | ||
publish-gh: | ||
runs-on: ubuntu-latest | ||
|
||
needs: build | ||
steps: | ||
- name: Download APK | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: infinity-personal-${{github.ref_name}} | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: See https://github.com/Docile-Alligator/Infinity-For-Reddit/releases/tag/${{github.ref_name}} | ||
files: | | ||
infinity-personal-${{github.ref_name}}.apk | ||
infinity-personal-${{github.ref_name}}.apk.sha256 |