Skip to content

Commit

Permalink
Setup a release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mars885 committed Jan 26, 2021
1 parent 6e47d56 commit a8608d8
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: [ubuntu-latest]

steps:
- name: Checkout Repo
uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Generate a Cache Key
run: ./checksum.sh checksum.txt

- name: Copy CI Gradle Properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Cache Gradle Folders
uses: actions/cache@v2
with:
path: |
~/.gradle/caches/
~/.gradle/wrapper/
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}

- name: Build Debug APK
run: ./gradlew assembleDebug

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false
files: |
app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
app/build/outputs/apk/debug/app-armeabi-v7a-debug.apk
app/build/outputs/apk/debug/app-x86_64-debug.apk
app/build/outputs/apk/debug/app-x86-debug.apk

0 comments on commit a8608d8

Please sign in to comment.