|
13 | 13 | jobs: |
14 | 14 | build: |
15 | 15 | runs-on: ubuntu-latest |
16 | | - |
17 | 16 | steps: |
18 | 17 | - name: Checkout |
19 | 18 | uses: actions/checkout@v4 |
|
24 | 23 | - name: Install Android platform tools |
25 | 24 | run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install platform-tools |
26 | 25 |
|
27 | | - - name: Prepare |
| 26 | + - name: Prepare keystore |
28 | 27 | run: | |
29 | 28 | echo "${{ secrets.KEYSTORE }}" | base64 -d > "$GITHUB_WORKSPACE/keystore.jks" |
30 | 29 |
|
|
81 | 80 | discussion_category_name: "General" |
82 | 81 | body_path: "${{ env.CHANGELOG_PATH }}" |
83 | 82 | draft: true |
| 83 | + |
| 84 | + fdroid: |
| 85 | + runs-on: ubuntu-latest |
| 86 | + needs: build |
| 87 | + steps: |
| 88 | + - name: Checkout |
| 89 | + uses: actions/checkout@v4 |
| 90 | + |
| 91 | + - name: Install F-Droid server |
| 92 | + run: | |
| 93 | + sudo add-apt-repository -y ppa:fdroid/fdroidserver |
| 94 | + sudo apt-get -qq update |
| 95 | + sudo apt-get -yqq install fdroidserver |
| 96 | +
|
| 97 | + - name: Prepare config |
| 98 | + run: | |
| 99 | + echo "keystorepass: '${{ secrets.KEYSTORE_PASS }}'" >> "$GITHUB_WORKSPACE/fdroid/config.yml" |
| 100 | + echo "keypass: '${{ secrets.KEYSTORE_KEY_PASS }}'" >> "$GITHUB_WORKSPACE/fdroid/config.yml" |
| 101 | + echo "repo_keyalias: '${{ secrets.KEYSTORE_ALIAS }}'" >> "$GITHUB_WORKSPACE/fdroid/config.yml" |
| 102 | + echo "${{ secrets.KEYSTORE }}" | base64 -d > "$GITHUB_WORKSPACE/fdroid/keystore.jks" |
| 103 | + chmod 600 "$GITHUB_WORKSPACE/fdroid/config.yml" |
| 104 | +
|
| 105 | + - name: Download artifact |
| 106 | + uses: actions/download-artifact@v4 |
| 107 | + with: |
| 108 | + name: "Stratum (APK)" |
| 109 | + |
| 110 | + - name: Update repo |
| 111 | + run: | |
| 112 | + mkdir "$GITHUB_WORKSPACE/fdroid/repo" |
| 113 | + mv com.stratumauth.app.fdroid.apk "$GITHUB_WORKSPACE/fdroid/repo/com.stratumauth.app.apk" |
| 114 | + |
| 115 | + pushd "$GITHUB_WORKSPACE/fdroid" |
| 116 | + fdroid update |
| 117 | + popd |
| 118 | +
|
| 119 | + - name: Deploy with rsync |
| 120 | + uses: burnett01/rsync-deployments@7.0.1 |
| 121 | + with: |
| 122 | + switches: -avzr --delete |
| 123 | + path: "fdroid/repo" |
| 124 | + remote_path: /var/www/fdroid |
| 125 | + remote_host: ${{ secrets.DEPLOY_HOST }} |
| 126 | + remote_user: ${{ secrets.DEPLOY_USER }} |
| 127 | + remote_key: ${{ secrets.DEPLOY_KEY }} |
0 commit comments