Antoine POPINEAU
4 years ago
4 changed files with 45 additions and 43 deletions
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
name: Release build |
||||
on: |
||||
push: |
||||
tags: |
||||
- "v*" |
||||
jobs: |
||||
build: |
||||
runs-on: ubuntu-latest |
||||
steps: |
||||
- uses: actions/checkout@v2 |
||||
with: |
||||
fetch-depth: 0 |
||||
ref: ${{ github.ref }} |
||||
- name: Setting up publication keystore |
||||
run: | |
||||
echo "${{ secrets.ANDROID_KEYSTORE }}" > ${HOME}/release.jks.asc |
||||
gpg -q --yes --batch -d --passphrase="${{ secrets.ENCRYPTION_KEY }}" -o ${HOME}/release.jks ${HOME}/release.jks.asc |
||||
echo -e "signing.store=${HOME}/release.jks\nsigning.key_passphrase=${{ secrets.ANDROID_KEYSTORE_KEY_PASSPHRASE }}\nsigning.alias=release\nsigning.store_passphrase=${{ secrets.ANDROID_KEYSTORE_STORE_PASSPHRASE }}" > local.properties |
||||
- name: Set up JDK 1.8 |
||||
uses: actions/setup-java@v1 |
||||
with: |
||||
java-version: 1.8 |
||||
- name: Build Otter |
||||
run: | |
||||
mkdir -p /home/runner/.android && touch /home/runner/.android/repositories.cfg |
||||
./gradlew assembleRelease |
||||
- name: Create Otter's release |
||||
id: create_release |
||||
uses: actions/create-release@v1 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
with: |
||||
tag_name: ${{ github.ref }} |
||||
release_name: ${{ github.ref }} |
||||
draft: false |
||||
prerelease: true |
||||
- name: Upload Otter's artifact (full version) |
||||
uses: actions/upload-release-asset@v1 |
||||
env: |
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
||||
with: |
||||
upload_url: ${{ steps.create_release.outputs.upload_url }} |
||||
asset_path: app/build/outputs/apk/release/app-release.apk |
||||
asset_name: otter-full-release.apk |
||||
asset_content_type: application/zip |
@ -1,43 +0,0 @@
@@ -1,43 +0,0 @@
|
||||
language: android |
||||
dist: trusty |
||||
if: tag != 'tip' |
||||
|
||||
android: |
||||
components: |
||||
- platform-tools |
||||
- tools |
||||
- build-tools-29.0.3 |
||||
- android-29 |
||||
|
||||
before_cache: |
||||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock |
||||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ |
||||
|
||||
cache: |
||||
directories: |
||||
- "$HOME/.gradle/caches/" |
||||
- "$HOME/.gradle/wrapper/" |
||||
- "$HOME/.android/build-cache" |
||||
|
||||
before_install: |
||||
- openssl aes-256-cbc -K $encrypted_532b6bc7108c_key -iv $encrypted_532b6bc7108c_iv -in dist/apognu.jks.enc -out dist/apognu.jks -d |
||||
- echo -e "signing.store=/home/travis/build/apognu/otter/dist/apognu.jks\nsigning.key_passphrase=${keystore_passphrase}\nsigning.alias=release\nsigning.store_passphrase=${keystore_passphrase}" > local.properties |
||||
|
||||
script: |
||||
- "./gradlew app:assembleRelease" |
||||
|
||||
before_deploy: |
||||
- RELEASE_MESSAGE="$(git tag -ln --format '%(subject)' $TRAVIS_TAG)" |
||||
|
||||
deploy: |
||||
- provider: releases |
||||
name: $TRAVIS_TAG |
||||
body: $RELEASE_MESSAGE |
||||
prerelease: false |
||||
file: app/build/outputs/apk/release/app-release.apk |
||||
overwrite: true |
||||
skip_cleanup: true |
||||
on: |
||||
tags: true |
||||
api_key: |
||||
secure: CIgVCinr1VDsMAAjcU8rxVq5SA0kDK3yTmtZW8Hc5RoOhVlKH24VWzdIjWdPZyW3vEDSPlBehAoSCDFI7oZ8xH/SgeXIdFMFbpCUi7QXp+ZdK8MdduHsXXVsEvVlIKi4R8ZhpFF/oR/yKwUo3zDT3SNv5zKZQvae+OzWIt9hm95gm9A+HexgdG4NjjtaNNp+wmhWEO8BvyZV6ZN05o+Z/qQz5pHc8n/v4sLcaQltnErZBaW4wBKKIvwZ54TQrWewW2y2m2lARKt8IGcgWW1jwQD7rzP1hzz/UGLF0eMbFCHNm+r8go0YoB7UDXKfmsZuDsFhjqpQuP3rOlavtXdBB1wAfsbJB3u1mso54w9/M9r1hRK2oClmhLOKU4wYzHLhwwa658qcbTDCJ2+Zwf81/D2YADj3hAkCdpoc0hJoEKQXRdhnQ0yiqYy4p/3RYh7WqSsU7iwUCqyDVHVprv89Qh5iPdbxezYpXQVWyeLpy4+4cYWqjggyxBy0wz7LUu9uClg2M2uaFZ/Ud1FOqtHeDP+Q8hW0DcArYPHXVAySyiuNXAhS/SWFnmpuCtzCs5NmnYA9lmYr33u3+rDJ9+LHArFXTVdfxU2xaSsG0kyjNVxKa3UXEoz0tqBJpeihkWGtjq04sK2AeEEw8lAt6wafFY6jMra23qPQRTCBNPuUsqk= |
Binary file not shown.
Loading…
Reference in new issue