Skip to content

Commit

Permalink
feat: add publish workflow (#689)
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Cattaneo <marco.cattaneo@moneyfarm.com>
  • Loading branch information
mcatta and Marco Cattaneo committed Jul 14, 2023
1 parent 33c402a commit a2f8267
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish

on:
push:
tags:
- "*"

jobs:

build:
name: Build APK
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle

- name: Create release keystore
run: |
echo "${{ secrets.RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }}" --batch release.keystore.asc > release.jks
- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Run Assemble Artifact
run: ./gradlew assembleFreeDynamic

- name: Upload Artifact
uses: actions/upload-artifact@v3.1.0
with:
name: apk
path: lemuroid-app/build/outputs/apk/freeDynamic/release/lemuroid-app-free-dynamic-release.apk

publish_apk:
name: Publish APK on Github
needs: [ build ]
runs-on: ubuntu-latest

steps:
- name: Download Artifact
uses: actions/download-artifact@v3.0.0
with:
name: apk

- name: Create pre-release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
title: "Pre-release"
files: lemuroid-app-free-dynamic-release.apk

0 comments on commit a2f8267

Please sign in to comment.