Set up automatic release publishing (#266)

Summary:
On tags, build and publish artifacts to bintray. The encrypted accounted creds are for a `flipperfbbot` account on Bintray I created for this.
Pull Request resolved: https://github.com/facebook/flipper/pull/266

Reviewed By: priteshrnandgaonkar

Differential Revision: D9848181

Pulled By: passy

fbshipit-source-id: cf9150b2352a9ce972c48533ce15e8e75aa908fe
This commit is contained in:
Pascal Hartig
2018-09-17 01:47:51 -07:00
committed by Facebook Github Bot
parent 0ac03b74cc
commit 474a36c0e2
4 changed files with 35 additions and 4 deletions

View File

@@ -11,8 +11,22 @@ jobs:
./gradlew :sample:assembleDebug
scripts/publish-android-snapshot.sh
release:
docker:
- image: circleci/android:api-28-ndk-r17b
steps:
- checkout
- run:
name: build and deploy
command: scripts/publish-android-release.sh
workflows:
version: 2
build:
jobs:
- build
- release:
filters:
tags:
- only: /^v.*/

View File

@@ -0,0 +1 @@
Salted__{<7B><>a]<5D>XH<06><><EFBFBD><06>%<25><>Yhuѹ<75>y<EFBFBD><79>[=<1A><>Ǔ:<3A><>OQ<4F><51><EFBFBD>4<EFBFBD><34>O<EFBFBD>Zq<5A>X6¸<36>C<EFBFBD>O<12><><15><><EFBFBD>aS<61><>*<2A>N<EFBFBD><1F><>X<EFBFBD><58>T(<28>Ǜ<EFBFBD>>*!,<2C>F<EFBFBD>w.T<>\<5C> d<>g

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.properties" || echo "")"
if [ "$ANDROID_PUBLISH_KEY" == "" ]; then
echo "No encryption key. Skipping snapshot deployment."
exit
elif [ "$IS_SNAPSHOT" != "" ]; then
echo "Build appears to be a SNAPSHOT release, but this is a script for building stable releases. Skipping ..."
exit 1
else
openssl aes-256-cbc -d -in scripts/bintray-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
"$BASEDIR"/gradlew bintrayUpload --info -PdryRun=false
fi

View File

@@ -7,10 +7,10 @@ IS_SNAPSHOT="$(grep 'VERSION_NAME=[0-9\.]\+-SNAPSHOT' "$BASEDIR/gradle.propertie
if [ "$ANDROID_PUBLISH_KEY" == "" ]; then
echo "No encryption key. Skipping snapshot deployment."
exit
elif [ "$IS_SNAPSHOT" == "" ]; then
echo "Skipping build. Given build doesn't appear to be a SNAPSHOT release."
elif [ "$IS_SNAPSHOT" != "" ]; then
echo "Build appears to be a SNAPSHOT release, but this is a script for building stable releases. Skipping ..."
exit 1
else
openssl aes-256-cbc -d -in scripts/gradle-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
"$BASEDIR"/gradlew uploadArchives --info
openssl aes-256-cbc -d -in scripts/bintray-publish-keys.enc -k "$ANDROID_PUBLISH_KEY" >> "$BASEDIR/gradle.properties"
"$BASEDIR"/gradlew bintrayUpload --info -PdryRun=false
fi