Skip to content

Commit

Permalink
Merge pull request #3552 from kiwix/better-cd-release-event
Browse files Browse the repository at this point in the history
Use GitHub 'release' event to trigger release
  • Loading branch information
kelson42 authored Nov 25, 2023
2 parents edee77d + 88f020e commit acb9036
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Publish App

on:
push:
branches-ignore:
- '*'
- '*/**'
tags:
- '*'
- '*/**'
release:
types: [published]

jobs:
publish:
Expand All @@ -32,19 +27,17 @@ jobs:
echo "$SSH_KEY" | base64 -d > ssh_key
chmod 600 ssh_key
- name: Set tag variable
run: echo "TAG=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV

- name: Publish APK to download.kiwix.org
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
UNIVERSAL_RELEASE_APK: app/build/outputs/apk/release/*universal*.apk
ARCHIVE_NAME: kiwix-${{ github.event.release.tag_name }}.apk
run: |
./gradlew assembleRelease
cp $UNIVERSAL_RELEASE_APK kiwix-${TAG}.apk
scp -P 30022 -vrp -i ssh_key -o StrictHostKeyChecking=no kiwix-${TAG}.apk [email protected]:/data/download/release/kiwix-android/
cp "$UNIVERSAL_RELEASE_APK" "$ARCHIVE_NAME"
scp -P 30022 -vrp -i ssh_key -o StrictHostKeyChecking=no "$ARCHIVE_NAME" [email protected]:/data/download/release/kiwix-android/
# This is temporary, once we will publish 3.7.0 then we will uncommented this code.
# # This is necessary for F-Droid
Expand Down

0 comments on commit acb9036

Please sign in to comment.