Skip to content

Commit c5b5b2d

Browse files
committed
update fdroid repo with tag
1 parent 03f4335 commit c5b5b2d

4 files changed

Lines changed: 424 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ env:
1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest
16-
1716
steps:
1817
- name: Checkout
1918
uses: actions/checkout@v4
@@ -24,7 +23,7 @@ jobs:
2423
- name: Install Android platform tools
2524
run: $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --install platform-tools
2625

27-
- name: Prepare
26+
- name: Prepare keystore
2827
run: |
2928
echo "${{ secrets.KEYSTORE }}" | base64 -d > "$GITHUB_WORKSPACE/keystore.jks"
3029
@@ -81,3 +80,48 @@ jobs:
8180
discussion_category_name: "General"
8281
body_path: "${{ env.CHANGELOG_PATH }}"
8382
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

Comments
 (0)