2023-04-01 01:37:07 +02:00
|
|
|
name: Nightly builds
|
2023-03-31 21:21:14 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
2023-09-30 21:37:42 +02:00
|
|
|
workflow_dispatch:
|
2023-03-31 21:21:14 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-06-10 16:18:15 +02:00
|
|
|
- name: Checkout Appkit Repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2023-10-03 02:20:22 +02:00
|
|
|
repository: grishka/appkit
|
2023-06-10 16:18:15 +02:00
|
|
|
|
|
|
|
- name: set up JDK 17
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
|
|
|
distribution: 'corretto'
|
|
|
|
cache: gradle
|
|
|
|
|
|
|
|
- name: Comment out signing config in appkits gradle file
|
|
|
|
run: |
|
|
|
|
sed -i 's/sign publishing\.publications\.release/\/\/ sign publishing.publications.release/' appkit/maven-push.gradle
|
|
|
|
|
|
|
|
- name: Grant execute permission for gradlew for Appkit
|
|
|
|
run: chmod +x gradlew
|
|
|
|
|
|
|
|
- name: Compile appkit
|
|
|
|
run: ./gradlew publishToMavenLocal
|
|
|
|
|
2023-03-31 21:21:14 +02:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: set up JDK 17
|
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
java-version: '17'
|
2023-04-14 19:06:19 +02:00
|
|
|
distribution: 'corretto'
|
2023-04-14 19:25:59 +02:00
|
|
|
cache: gradle
|
2023-04-10 12:57:59 +02:00
|
|
|
|
2023-04-09 02:00:55 +02:00
|
|
|
- name: Get current date
|
|
|
|
id: date
|
2023-04-10 12:57:59 +02:00
|
|
|
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
2023-03-31 21:21:14 +02:00
|
|
|
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
2023-04-01 22:58:13 +02:00
|
|
|
|
2023-04-02 01:40:10 +02:00
|
|
|
- name: Decode Keystore
|
|
|
|
id: decode_keystore
|
|
|
|
uses: timheuer/base64-to-file@v1
|
|
|
|
with:
|
2023-04-02 18:27:29 +02:00
|
|
|
fileName: 'nightly_keystore.jks'
|
|
|
|
fileDir: './mastodon/keystore/'
|
2023-04-02 01:40:10 +02:00
|
|
|
encodedString: ${{ secrets.KEYSTORE }}
|
2023-04-01 22:58:13 +02:00
|
|
|
|
2023-03-31 21:21:14 +02:00
|
|
|
- name: Build with Gradle
|
2023-04-01 23:23:46 +02:00
|
|
|
run: ./gradlew assembleNightly
|
2023-04-02 01:40:10 +02:00
|
|
|
env:
|
|
|
|
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
|
|
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
|
|
|
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
|
2023-04-09 02:00:55 +02:00
|
|
|
CURRENT_DATE: ${{ steps.date.outputs.date }}
|
2023-04-02 01:40:10 +02:00
|
|
|
|
2023-04-01 01:21:43 +02:00
|
|
|
- name: Upload a Build Artifact
|
2023-04-01 01:23:06 +02:00
|
|
|
uses: actions/upload-artifact@v3.1.2
|
2023-04-01 01:21:43 +02:00
|
|
|
with:
|
2023-04-03 14:28:50 +02:00
|
|
|
name: moshidon-nightly.apk
|
2023-04-01 23:23:46 +02:00
|
|
|
path: ./mastodon/build/outputs/apk/nightly/moshidon-nightly.apk
|