mirror of
https://github.com/bitwarden/mobile
synced 2024-12-23 07:26:44 +01:00
Update F-Droid release process (#3249)
This commit is contained in:
parent
ffb7b3b8ac
commit
a333e72448
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
@ -65,7 +65,6 @@ jobs:
|
|||||||
description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ steps.branch.outputs.branch-name }}'
|
description: 'Deployment ${{ steps.version.outputs.version }} from branch ${{ steps.branch.outputs.branch-name }}'
|
||||||
task: release
|
task: release
|
||||||
|
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
||||||
@ -152,9 +151,7 @@ jobs:
|
|||||||
node-version: '16.x'
|
node-version: '16.x'
|
||||||
|
|
||||||
- name: Set up F-Droid server
|
- name: Set up F-Droid server
|
||||||
run: |
|
run: pip install git+https://gitlab.com/fdroid/fdroidserver.git
|
||||||
sudo apt-get -qq update
|
|
||||||
sudo apt-get -qqy install --no-install-recommends fdroidserver wget
|
|
||||||
|
|
||||||
- name: Set up Git credentials
|
- name: Set up Git credentials
|
||||||
env:
|
env:
|
||||||
@ -167,9 +164,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
node --version
|
echo "Node Version: $(node --version)"
|
||||||
npm --version
|
echo "NPM Version: $(npm --version)"
|
||||||
git --version
|
echo "Git Version: $(git --version)"
|
||||||
|
echo "F-Droid Server Version: $(fdroid --version)"
|
||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
@ -194,27 +192,30 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
FDROID_STORE_KEYSTORE_PASSWORD: ${{ secrets.FDROID_STORE_KEYSTORE_PASSWORD }}
|
FDROID_STORE_KEYSTORE_PASSWORD: ${{ secrets.FDROID_STORE_KEYSTORE_PASSWORD }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE
|
# Create required directories.
|
||||||
mkdir dist
|
mkdir dist
|
||||||
cp CNAME ./dist
|
mkdir -p store/temp/fdroid
|
||||||
cd store
|
mkdir -p store/fdroid/repo
|
||||||
chmod 600 fdroid/config.py fdroid/keystore.jks
|
|
||||||
mkdir -p temp/fdroid
|
# Configure F-Droid server.
|
||||||
|
cp CNAME dist/
|
||||||
|
chmod 600 store/fdroid/config.yml store/fdroid/keystore.jks
|
||||||
TEMP_DIR="$GITHUB_WORKSPACE/store/temp/fdroid"
|
TEMP_DIR="$GITHUB_WORKSPACE/store/temp/fdroid"
|
||||||
cd fdroid
|
echo "keypass: $FDROID_STORE_KEYSTORE_PASSWORD" >> store/fdroid/config.yml
|
||||||
echo "keypass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py
|
echo "keystorepass: $FDROID_STORE_KEYSTORE_PASSWORD" >> store/fdroid/config.yml
|
||||||
echo "keystorepass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py
|
echo "local_copy_dir: $TEMP_DIR" >> store/fdroid/config.yml
|
||||||
echo "local_copy_dir=\"$TEMP_DIR\"" >>config.py
|
mv $GITHUB_WORKSPACE/com.x8bit.bitwarden-fdroid.apk store/fdroid/repo/
|
||||||
mkdir -p repo
|
|
||||||
mv $GITHUB_WORKSPACE/com.x8bit.bitwarden-fdroid.apk ./repo/
|
# Run update and deploy.
|
||||||
|
cd store/fdroid
|
||||||
fdroid update
|
fdroid update
|
||||||
fdroid server update
|
fdroid deploy
|
||||||
cd ..
|
cd ../..
|
||||||
rm -rf temp/fdroid/archive
|
|
||||||
mv -v temp/fdroid ../dist
|
# Move files for distribution.
|
||||||
cd fdroid
|
rm -rf store/temp/fdroid/archive
|
||||||
cp index.html btn.png qr.png ../../dist/fdroid
|
mv -v store/temp/fdroid dist
|
||||||
cd $GITHUB_WORKSPACE
|
cp store/fdroid/index.html store/fdroid/btn.png store/fdroid/qr.png dist/fdroid
|
||||||
|
|
||||||
- name: Deploy to gh-pages
|
- name: Deploy to gh-pages
|
||||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
repo_url = "https://mobileapp.bitwarden.com/fdroid/repo"
|
|
||||||
repo_name = "Bitwarden F-Droid Repo"
|
|
||||||
repo_icon = "fdroid-icon.png"
|
|
||||||
repo_description = """
|
|
||||||
F-Droid repo for Bitwarden.
|
|
||||||
"""
|
|
||||||
|
|
||||||
archive_older = 2
|
|
||||||
archive_url = "https://does.not.exist"
|
|
||||||
archive_name = "Bitwarden Archive Repo"
|
|
||||||
archive_icon = "fdroid-icon.png"
|
|
||||||
archive_description = """
|
|
||||||
F-Droid archive repo for Bitwarden.
|
|
||||||
"""
|
|
||||||
|
|
||||||
repo_keyalias = "bitwarden-Virtual-Machine"
|
|
||||||
keystore = "keystore.jks"
|
|
||||||
keydname = "CN=bitwarden-Virtual-Machine, OU=F-Droid"
|
|
18
store/fdroid/config.yml
Normal file
18
store/fdroid/config.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
repo_url: https://mobileapp.bitwarden.com/fdroid/repo
|
||||||
|
repo_name: Bitwarden F-Droid Repo
|
||||||
|
repo_icon: fdroid-icon.png
|
||||||
|
repo_description: >-
|
||||||
|
F-Droid repo for Bitwarden.
|
||||||
|
|
||||||
|
archive_older: 2
|
||||||
|
archive_url: https://does.not.exist/archive
|
||||||
|
archive_name: Bitwarden Archive Repo
|
||||||
|
archive_icon: fdroid-icon.png
|
||||||
|
archive_description: >-
|
||||||
|
F-Droid archive repo for Bitwarden.
|
||||||
|
|
||||||
|
repo_keyalias: bitwarden-Virtual-Machine
|
||||||
|
keystore: keystore.jks
|
||||||
|
keydname: CN=bitwarden-Virtual-Machine, OU=F-Droid
|
Loading…
Reference in New Issue
Block a user