Skip to content

Commit

Permalink
Save artifacts after a workflow run
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Verkhovsky committed Dec 11, 2020
1 parent 16e9aad commit 542c07f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- '**.md'
- app/**

env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
RELEASE_SIGN_KEY_ALIAS: ${{ secrets.RELEASE_SIGN_KEY_ALIAS }}
RELEASE_SIGN_KEY_PASSWORD: ${{ secrets.RELEASE_SIGN_KEY_PASSWORD }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -24,5 +29,18 @@ jobs:
- name: Test
run: ./gradlew fingerprint:test

- name: Build
run: ./gradlew fingerprint:assemble
- name: Build library
run: ./gradlew fingerprint:assembleRelease

- name: Save library to artifacts

uses: actions/upload-artifact@v2
- with:
path: fingerprint/build/outputs/aar/*

- name: Build App
run: ./gradlew app:assembleRelease

uses: actions/upload-artifact@v2
- with:
path: app/build/outputs/apk/release/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ captures/
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
app/keystore/*

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
Expand Down
21 changes: 21 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,31 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
def keystoreProperties = new Properties()
def keystorePropsFile = file("keystore/keystore_config")

if (keystorePropsFile.exists()) {
file("keystore/keystore_config").withInputStream { keystoreProperties.load(it) }
storeFile file("$keystoreProperties.storeFile")
storePassword "$keystoreProperties.storePassword"
keyAlias "$keystoreProperties.keyAlias"
keyPassword "$keystoreProperties.keyPassword"
} else {
storeFile file("release.jks")
storePassword System.getenv('KEYSTORE_PASSWORD')
keyAlias System.getenv('RELEASE_SIGN_KEY_ALIAS')
keyPassword System.getenv('RELEASE_SIGN_KEY_PASSWORD')
}
}
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

Expand Down
Binary file added app/release.jks
Binary file not shown.

0 comments on commit 542c07f

Please sign in to comment.