Skip to content

Commit d1aa179

Browse files
author
UserGreen
committed
ci: split validate from release build, drop duplicate runs
1 parent 63171cf commit d1aa179

4 files changed

Lines changed: 67 additions & 46 deletions

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
name: build
22

33
on:
4-
push:
5-
paths:
6-
- '**/*.kt'
7-
- '**/*.kts'
8-
- '**/*.toml'
9-
- 'gradle/**'
10-
- 'gradlew'
11-
- '.github/workflows/build.yml'
4+
workflow_dispatch:
125
pull_request:
136
paths:
147
- '**/*.kt'
@@ -17,7 +10,13 @@ on:
1710
- 'gradle/**'
1811
- 'gradlew'
1912
- '.github/workflows/build.yml'
20-
workflow_dispatch:
13+
push:
14+
tags:
15+
- 'v*'
16+
17+
concurrency:
18+
group: build-${{ github.ref }}
19+
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }}
2120

2221
jobs:
2322
build:
@@ -32,12 +31,12 @@ jobs:
3231
distribution: temurin
3332
java-version: '17'
3433
- uses: gradle/actions/setup-gradle@v4
35-
- run: ./gradlew assembleFullRelease assembleFdroidRelease
36-
- uses: actions/upload-artifact@v4
37-
with:
38-
name: full-release
39-
path: app/build/outputs/apk/full/release/*.apk
40-
- uses: actions/upload-artifact@v4
34+
35+
- name: build both flavors in one invocation
36+
run: ./gradlew -Pfdroid assembleFullRelease assembleFdroidRelease
37+
38+
- name: upload unsigned fdroid apk
39+
uses: actions/upload-artifact@v4
4140
with:
42-
name: fdroid-release
43-
path: app/build/outputs/apk/fdroid/release/*.apk
41+
name: fdroid-unsigned
42+
path: app/build/outputs/apk/fdroid/release/app-fdroid-release-unsigned.apk

.github/workflows/release_fdroid.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/validate-fastlane-metadata.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
paths:
66
- 'fastlane/metadata/**'
77
push:
8+
branches:
9+
- '**'
810
paths:
911
- 'fastlane/metadata/**'
1012

.github/workflows/validate.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: validate
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
paths:
8+
- '**/*.kt'
9+
- '**/*.kts'
10+
- '**/*.toml'
11+
- 'gradle/**'
12+
- 'gradlew'
13+
- '.github/workflows/validate.yml'
14+
pull_request:
15+
paths:
16+
- '**/*.kt'
17+
- '**/*.kts'
18+
- '**/*.toml'
19+
- 'gradle/**'
20+
- 'gradlew'
21+
- '.github/workflows/validate.yml'
22+
23+
concurrency:
24+
group: validate-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
validate:
29+
runs-on: ubuntu-latest
30+
env:
31+
ASTER_UNSIGNED: '1'
32+
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-java@v4
36+
with:
37+
distribution: temurin
38+
java-version: '17'
39+
- uses: gradle/actions/setup-gradle@v4
40+
41+
- name: compile both flavors and run unit tests
42+
run: ./gradlew -Pfdroid compileFullDebugKotlin testFdroidDebugUnitTest testDebugUnitTest
43+
44+
- name: upload test reports
45+
if: failure()
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: test-reports
49+
path: '**/build/reports/tests/**'

0 commit comments

Comments
 (0)