-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (85 loc) · 2.68 KB
/
package.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build and sign application
on:
push:
branches: ['feature/signing_key']
# tags:
# - "v[0-9]+.[0-9]+.[0-9]+"
# - "v[0-9]+.[0-9]+.[0-9]+([0-9]+)"
# workflow_dispatch:
# inputs:
# name:
# description: "Release-Build"
# default: "Generate release build"
permissions:
contents: read
jobs:
build:
environment: packaging
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: app
- name: Checkout "eidmsdk_flutter"
uses: actions/checkout@v4
with:
repository: slovensko-digital/eidmsdk-flutter
token: ${{ secrets.GH_PAT }}
path: eidmsdk_flutter
- name: Checkout "autogram_sign"
uses: actions/checkout@v4
with:
repository: slovensko-digital/avm-client-dart
token: ${{ secrets.GH_PAT }}
path: autogram_sign
- uses: actions/setup-java@v1
with:
java-version: '17.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '3.16.5'
channel: 'stable'
- name: Install dependencies
working-directory: ./app
run: flutter pub get
- name: Test
working-directory: ./app
run: flutter test
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.GOOGLE_KEYSTORE_BASE_64 }}
working-directory: ./app
run: |
echo $ENCODED_STRING | base64 -d > release_keystore.jks
pwd
ls
- name: Build
env:
AVM_KEYSTORE_FILE: release_keystore.jks
AVM_KEYSTORE_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_PASSWORD }}
AVM_KEY_ALIAS: ${{ secrets.GOOGLE_RELEASE_KEYSTORE_ALIAS }}
AVM_KEY_PASSWORD: ${{ secrets.GOOGLE_RELEASE_KEY_PASSWORD }}
working-directory: ./app
run: |
pwd
ls
flutter build apk
- name: Get release file apk path
id: releaseApk
run: echo "apkfile=$(find ./app/build/outputs/apk/release/*.apk)" >> $GITHUB_OUTPUT
- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v3
with:
name: release-artifacts
path: ${{ steps.releaseApk.outputs.apkfile }}
# - name: Create release if tag pushed
# uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# draft: true
# prerelease: true
# files: |
# ./app/build/app/outputs/apk/release/app-release.apk