Skip to content

Commit e747b2e

Browse files
Merge branch 'dev'
2 parents 8ef576d + 6c71e98 commit e747b2e

130 files changed

Lines changed: 1674 additions & 975 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
changelog:
2+
categories:
3+
- title: "🛑 Breaking Changes"
4+
labels:
5+
- "Type: Breaking Change"
6+
- title: "🎉 New Features"
7+
labels:
8+
- "Type: Enhancement"
9+
- title: "🪲 Fixed Bugs"
10+
labels:
11+
- "Type: Bug"
12+
- title: "🔧 Other Changes"
13+
labels:
14+
- "*"

.github/workflows/build.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
1+
name: Test and build Android app
2+
13
on:
24
pull_request:
35
types:
46
- opened
57
- reopened
68
- synchronize
79
- ready_for_review
8-
branches:
9-
- 'main'
10-
paths-ignore:
11-
- '**.md'
12-
- 'doc/**'
13-
- '.git/'
14-
- '.vscode/'
15-
push:
16-
branches:
17-
- 'main'
1810
paths-ignore:
1911
- '**.md'
2012
- 'doc/**'
2113
- '.git/'
2214
- '.vscode/'
15+
workflow_dispatch:
16+
2317
jobs:
2418
build-android:
2519
name: Build Android
@@ -35,14 +29,25 @@ jobs:
3529
- name: 📦 Get dependencies
3630
run: flutter pub get
3731
working-directory: ./taletime
32+
- name: 🔑 Setup signing key
33+
run: |
34+
echo "${{ secrets.SIGNING_KEY_KEYSTORE }}" | base64 -d > taletime/android/app/keystore.jks
3835
- name: 🧪 Run tests
3936
run: flutter test
4037
working-directory: ./taletime
4138
- name: 📱 Build Android
42-
run: flutter build apk
39+
id: build_apk
40+
env:
41+
SIGNING_KEY_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_KEY_PASSWORD }}
42+
SIGNING_KEY_STORE_PASSWORD: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
43+
run: |
44+
VERSION=$(grep -oP '^version:\s+\K.+$' pubspec.yaml)
45+
flutter build apk --flavor staging --build-name $VERSION+$GITHUB_RUN_NUMBER
46+
echo "versionName=$VERSION+$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT
47+
cp build/app/outputs/flutter-apk/app-staging-release.apk build/app/outputs/flutter-apk/TaleTime-$VERSION+$GITHUB_RUN_NUMBER.apk
4348
working-directory: ./taletime
4449
- name: 📦 Upload artifact
4550
uses: actions/upload-artifact@v2
4651
with:
47-
name: app-release.apk
48-
path: ./taletime/build/app/outputs/flutter-apk/app-release.apk
52+
name: TaleTime-${{ steps.build_apk.outputs.versionName }}.apk
53+
path: ./taletime/build/app/outputs/flutter-apk/TaleTime*.apk

.github/workflows/pr-labels.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Assign labels to Pull Requests
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
types:
7+
- opened
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
- labeled
12+
- unlabeled
13+
14+
permissions:
15+
pull-requests: write
16+
contents: read
17+
18+
jobs:
19+
assign-labels:
20+
runs-on: ubuntu-latest
21+
name: Assign labels in pull request
22+
if: github.event.pull_request.merged == false
23+
steps:
24+
- name: ⬇️ Checkout
25+
uses: actions/checkout@v3
26+
- name: 🏷 Assign labels
27+
uses: mauroalderete/action-assign-labels@v1
28+
with:
29+
github-token: ${{ secrets.GITHUB_TOKEN }}
30+
conventional-commits: |
31+
conventional-commits:
32+
- type: 'fix'
33+
nouns: ['FIX', 'Fix', 'fix', 'FIXED', 'Fixed', 'fixed']
34+
labels: ['Type: Bug']
35+
- type: 'feature'
36+
nouns: ['FEATURE', 'Feature', 'feature', 'FEAT', 'Feat', 'feat']
37+
labels: ['Type: Enhancement']
38+
- type: 'breaking_change'
39+
nouns: ['BREAKING CHANGE', 'BREAKING', 'MAJOR', 'FIX!', 'Fix!', 'fix!', 'FIXED!', 'Fixed!', 'fixed!', 'FEATURE!', 'Feature!', 'feature!', 'FEAT!', 'Feat!', 'feat!']
40+
labels: ['Type: Breaking Change']

.github/workflows/release-merge-version.yaml

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,46 +15,80 @@ jobs:
1515

1616
steps:
1717
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
18-
- uses: actions/checkout@v3
18+
- name: ⬇️ Checkout
19+
uses: actions/checkout@v3
1920
with:
2021
fetch-depth: 0
2122
ref: "dev"
22-
- name: Prepare Git
23+
- name: ⚙️ Setup Flutter
24+
uses: subosito/flutter-action@v2
25+
with:
26+
channel: 'stable'
27+
cache: true
28+
- name: ⚙️ Prepare Git
2329
run: |
2430
git config --global user.name 'github-actions[bot]'
2531
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
32+
- name: 📦 Get dependencies
33+
run: flutter pub get
34+
working-directory: ./taletime
35+
- name: 🔑 Setup signing key
36+
run: |
37+
echo "${{ secrets.SIGNING_KEY_KEYSTORE }}" | base64 -d > taletime/android/app/keystore.jks
2638
27-
- name: "Get next version"
39+
- name: Get next version
2840
uses: ietf-tools/semver-action@v1
2941
id: get_next_version
3042
with:
3143
token: ${{ github.token }}
3244
branch: dev
3345

34-
- name: Bump version
46+
- name: Bump version
3547
run: |
3648
sed -i "s/^version:.*$/version: ${{ steps.get_next_version.outputs.nextStrict }}/g" taletime/pubspec.yaml
3749
git commit -am "fix: Bumped version to ${{ steps.get_next_version.outputs.nextStrict }}"
3850
39-
- name: Merge into main
51+
- name: 🔹 Merge into main
4052
run: |
4153
git checkout main
4254
git merge dev --no-ff
43-
- name: Create tag
55+
- name: 🏷️ Create tag
4456
run: git tag ${{ steps.get_next_version.outputs.next }}
45-
- name: Merge back into dev
57+
58+
- name: 🧪 Run tests
59+
run: flutter test
60+
working-directory: ./taletime
61+
- name: 📱 Build Android app
62+
env:
63+
SIGNING_KEY_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_KEY_PASSWORD }}
64+
SIGNING_KEY_STORE_PASSWORD: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
65+
run: |
66+
flutter build apk --flavor prod --build-number $GITHUB_RUN_NUMBER
67+
cp build/app/outputs/flutter-apk/app-prod-release.apk build/app/outputs/flutter-apk/TaleTime-${{ steps.get_next_version.outputs.nextStrict }}.apk
68+
working-directory: ./taletime
69+
70+
- name: 🔹 Merge back into dev
4671
run: |
4772
git checkout dev
4873
git merge main --no-ff
4974
50-
- name: Prepare next dev version
75+
- name: Prepare next dev version
5176
run: |
5277
NEXT_VERSION=${{ steps.get_next_version.outputs.nextStrict }}
5378
IFS=. read -r v1 v2 v3 <<< "${NEXT_VERSION}"
5479
DEV_VERSION="${v1}.${v2}.$((v3 + 1))"
5580
sed -i "s/^version:.*$/version: ${DEV_VERSION}-SNAPSHOT/g" taletime/pubspec.yaml
5681
git commit -am "fix: Prepared next dev version: ${DEV_VERSION}-SNAPSHOT"
5782
58-
- name: Push everything
83+
- name: ⬆️ Push everything
5984
run: git push origin main dev --tags
85+
86+
- name: 📦 Create Release
87+
uses: softprops/action-gh-release@v1
88+
with:
89+
token: ${{ secrets.GITHUB_TOKEN }}
90+
tag_name: ${{ steps.get_next_version.outputs.next }}
91+
generate_release_notes: true
92+
files: |
93+
./taletime/build/app/outputs/flutter-apk/TaleTime*.apk
6094

taletime/android/app/build.gradle

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
5858
applicationId "de.htwsaar.taletime"
5959
//minSdkVersion flutter.minSdkVersion
60-
minSdkVersion 21
60+
minSdkVersion 23
6161
targetSdkVersion flutter.targetSdkVersion
6262
versionCode flutterVersionCode.toInteger()
6363
versionName flutterVersionName
@@ -66,11 +66,45 @@ android {
6666

6767
buildTypes {
6868
release {
69-
// TODO: Add your own signing config for the release build.
70-
// Signing with the debug keys for now, so `flutter run --release` works.
69+
70+
}
71+
}
72+
73+
signingConfigs {
74+
release {
75+
storeFile file("./keystore.jks")
76+
storePassword System.getenv("SIGNING_KEY_STORE_PASSWORD")
77+
keyAlias "TaleTime-Key"
78+
keyPassword System.getenv("SIGNING_KEY_KEY_PASSWORD")
79+
}
80+
}
81+
82+
flavorDimensions "environment"
83+
84+
productFlavors {
85+
86+
dev {
87+
dimension "environment"
88+
applicationIdSuffix ".dev"
89+
resValue "string", "app_name", "[Dev] TaleTime"
7190
signingConfig signingConfigs.debug
7291
}
92+
93+
staging {
94+
dimension "environment"
95+
applicationIdSuffix ".stageing"
96+
resValue "string", "app_name", "[Staging] TaleTime"
97+
signingConfig signingConfigs.release
98+
}
99+
100+
prod {
101+
dimension "environment"
102+
resValue "string", "app_name", "TaleTime"
103+
signingConfig signingConfigs.release
104+
}
73105
}
106+
107+
74108
}
75109

76110
flutter {

taletime/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
44
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
55
<application
6-
android:label="taletime"
6+
android:label="@string/app_name"
77
android:name="${applicationName}"
88
android:icon="@mipmap/ic_launcher">
99
<activity
12 KB
Loading
7.61 KB
Loading
12 KB
Loading
7.61 KB
Loading

0 commit comments

Comments
 (0)