Skip to content

Commit 542c07f

Browse files
Save artifacts after a workflow run
1 parent 16e9aad commit 542c07f

File tree

4 files changed

+42
-2
lines changed

4 files changed

+42
-2
lines changed

.github/workflows/blank.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
- '**.md'
99
- app/**
1010

11+
env:
12+
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
13+
RELEASE_SIGN_KEY_ALIAS: ${{ secrets.RELEASE_SIGN_KEY_ALIAS }}
14+
RELEASE_SIGN_KEY_PASSWORD: ${{ secrets.RELEASE_SIGN_KEY_PASSWORD }}
15+
1116
jobs:
1217
build:
1318
runs-on: ubuntu-latest
@@ -24,5 +29,18 @@ jobs:
2429
- name: Test
2530
run: ./gradlew fingerprint:test
2631

27-
- name: Build
28-
run: ./gradlew fingerprint:assemble
32+
- name: Build library
33+
run: ./gradlew fingerprint:assembleRelease
34+
35+
- name: Save library to artifacts
36+
37+
uses: actions/upload-artifact@v2
38+
- with:
39+
path: fingerprint/build/outputs/aar/*
40+
41+
- name: Build App
42+
run: ./gradlew app:assembleRelease
43+
44+
uses: actions/upload-artifact@v2
45+
- with:
46+
path: app/build/outputs/apk/release/*

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ captures/
4444
# Uncomment the following lines if you do not want to check your keystore files in.
4545
#*.jks
4646
#*.keystore
47+
app/keystore/*
4748

4849
# External native build folder generated in Android Studio 2.2 and later
4950
.externalNativeBuild

app/build.gradle

+21
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,31 @@ android {
1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
1818

19+
signingConfigs {
20+
release {
21+
def keystoreProperties = new Properties()
22+
def keystorePropsFile = file("keystore/keystore_config")
23+
24+
if (keystorePropsFile.exists()) {
25+
file("keystore/keystore_config").withInputStream { keystoreProperties.load(it) }
26+
storeFile file("$keystoreProperties.storeFile")
27+
storePassword "$keystoreProperties.storePassword"
28+
keyAlias "$keystoreProperties.keyAlias"
29+
keyPassword "$keystoreProperties.keyPassword"
30+
} else {
31+
storeFile file("release.jks")
32+
storePassword System.getenv('KEYSTORE_PASSWORD')
33+
keyAlias System.getenv('RELEASE_SIGN_KEY_ALIAS')
34+
keyPassword System.getenv('RELEASE_SIGN_KEY_PASSWORD')
35+
}
36+
}
37+
}
38+
1939
buildTypes {
2040
release {
2141
minifyEnabled false
2242
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
43+
signingConfig signingConfigs.release
2344
}
2445
}
2546

app/release.jks

2.24 KB
Binary file not shown.

0 commit comments

Comments
 (0)