Release #98
Workflow file for this run
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
--- | |
name: Release | |
run-name: Release ${{ inputs.release_type }} | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- name: Download F-Droid .apk artifact | |
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 | |
with: | |
workflow: build.yml | |
workflow_conclusion: success | |
branch: rc | |
name: com.x8bit.bitwarden-fdroid.apk | |
- name: Set up Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: '16.x' | |
- name: Set up F-Droid server | |
run: | | |
# sudo apt-get -qq update | |
# sudo apt-get -qqy install --no-install-recommends fdroidserver wget | |
pip install git+https://gitlab.com/fdroid/fdroidserver.git | |
- name: F-Droid TEST | |
run: | | |
fdroid --help | |
fdroid update --help | |
fdroid deploy --help | |
exit 1 | |
- name: Set up Git credentials | |
env: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
run: | | |
git config --global credential.helper store | |
echo "https://${ACCESS_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials | |
git config --global user.email "ci@bitwarden.com" | |
git config --global user.name "Bitwarden CI" | |
- name: Print environment | |
run: | | |
node --version | |
npm --version | |
git --version | |
echo "GitHub ref: $GITHUB_REF" | |
echo "GitHub event: $GITHUB_EVENT" | |
- name: Install Node dependencies | |
run: npm install | |
- name: Login to Azure - CI Subscription | |
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0 | |
with: | |
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }} | |
- name: Download secrets | |
env: | |
ACCOUNT_NAME: bitwardenci | |
CONTAINER_NAME: mobile | |
run: | | |
mkdir -p $HOME/secrets | |
az storage blob download --account-name $ACCOUNT_NAME --container-name $CONTAINER_NAME \ | |
--name store_fdroid-keystore.jks --file ./store/fdroid/keystore.jks --output none | |
- name: Compile for F-Droid Store | |
env: | |
FDROID_STORE_KEYSTORE_PASSWORD: ${{ secrets.FDROID_STORE_KEYSTORE_PASSWORD }} | |
run: | | |
cd $GITHUB_WORKSPACE | |
mkdir dist | |
cp CNAME ./dist | |
cd store | |
chmod 600 fdroid/config.py fdroid/keystore.jks | |
mkdir -p temp/fdroid | |
TEMP_DIR="$GITHUB_WORKSPACE/store/temp/fdroid" | |
cd fdroid | |
echo "keypass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py | |
echo "keystorepass=\"$FDROID_STORE_KEYSTORE_PASSWORD\"" >>config.py | |
echo "local_copy_dir=\"$TEMP_DIR\"" >>config.py | |
mkdir -p repo | |
mv $GITHUB_WORKSPACE/com.x8bit.bitwarden-fdroid.apk ./repo/ | |
fdroid update | |
fdroid deploy update | |
cd .. | |
rm -rf temp/fdroid/archive | |
mv -v temp/fdroid ../dist | |
cd fdroid | |
cp index.html btn.png qr.png ../../dist/fdroid | |
cd $GITHUB_WORKSPACE | |
- name: Deploy to gh-pages | |
if: ${{ inputs.release_type != 'Dry Run' }} | |
run: npm run deploy |