-
-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3552 from kiwix/better-cd-release-event
Use GitHub 'release' event to trigger release
- Loading branch information
Showing
1 changed file
with
5 additions
and
12 deletions.
There are no files selected for viewing
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
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: | ||
|
@@ -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 | ||
|