From 4e070027c46951af89b6b3c14bae2128b1384009 Mon Sep 17 00:00:00 2001 From: Theo Kanning Date: Mon, 5 Oct 2020 18:26:56 -0500 Subject: [PATCH] Add github action to publish artifacts after a release --- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ api/build.gradle | 2 +- client/build.gradle | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b26ccb1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish Artifacts + +on: + release: + types: [published, created, edited] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew app:bintrayUpload client:bintrayUpload + env: + RELEASE_VERSION : ${{ github.github_ref }} + BINTRAY_USER : ${{ secrets.BINTRAY_USER }} + BINTRARY_KEY : ${{ secrets.BINTRAY_KEY }} diff --git a/api/build.gradle b/api/build.gradle index f1511cf..53351e7 100644 --- a/api/build.gradle +++ b/api/build.gradle @@ -8,7 +8,7 @@ dependencies { } ext { - libraryVersion = '0.2.0' + libraryVersion = System.getenv("RELEASE_VERSION") } version = libraryVersion diff --git a/client/build.gradle b/client/build.gradle index b793794..7bdb84c 100644 --- a/client/build.gradle +++ b/client/build.gradle @@ -10,7 +10,7 @@ dependencies { } ext { - libraryVersion = '0.2.0' + libraryVersion = System.getenv("RELEASE_VERSION") } version = libraryVersion