Commit 40d3929 1 parent f8e58fe commit 40d3929 Copy full SHA for 40d3929
File tree 4 files changed +53
-9
lines changed
4 files changed +53
-9
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and release
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ if : " startsWith(github.event.head_commit.message, 'Release: ')"
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ - name : Setup Java JDK
13
+ uses : actions/setup-java@v4
14
+ with :
15
+ distribution : ' zulu'
16
+ java-version : 11
17
+ - name : Get app version
18
+ id : app_version
19
+ run : echo "APP_VERSION=$(./gradlew version --no-daemon --console=plain -q | tail -n 1)" >> $GITHUB_OUTPUT
20
+ - name : Check release with local version
21
+ if : " github.event.head_commit.message != format('Release: {0}', steps.app_version.outputs.APP_VERSION)"
22
+ run : |
23
+ echo 'Local version doesn't match commit version'
24
+ exit 1
25
+ - name : Run test
26
+ run : ./gradlew test
27
+ - name : Create release in artifactory
28
+ env :
29
+ REPOSITORY_USERNAME : ${{ secrets.REPOSITORY_USERNAME }}
30
+ REPOSITORY_PASSWORD : ${{ secrets.REPOSITORY_PASSWORD }}
31
+ run : |
32
+ ./gradlew clean
33
+ ./gradlew assembleRelease assembleReleaseUnitTest
34
+ ./gradlew artifactoryPublish \
35
+ -PrepositoryUserName=${{ env.REPOSITORY_USERNAME }} \
36
+ -PrepositoryPassword=${{ env.REPOSITORY_PASSWORD }}
37
+ - name : Create GH release
38
+ env :
39
+ APP_VERSION : ${{ steps.app_version.outputs.APP_VERSION }}
40
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ run : |
42
+ gh release create "v$APP_VERSION" \
43
+ -t "v$APP_VERSION" \
44
+ -n 'Check [CHANGELOG](./CHANGELOG.md)'
Original file line number Diff line number Diff line change 1
1
name : Run tests
2
2
on : [push, pull_request]
3
3
jobs :
4
- macos :
4
+ tests :
5
5
runs-on : ubuntu-latest
6
6
steps :
7
- - uses : actions/checkout@v3
7
+ - uses : actions/checkout@v4
8
8
- name : Setup Java JDK
9
- uses : actions/setup-java@v3
9
+ uses : actions/setup-java@v4
10
10
with :
11
11
distribution : ' zulu'
12
12
java-version : 11
13
- - name : Run all test
13
+ - name : Run test
14
14
run : ./gradlew test
15
15
- name : Run build
16
16
run : ./gradlew assembleDebug
Original file line number Diff line number Diff line change @@ -65,10 +65,6 @@ publishing {
65
65
}
66
66
}
67
67
68
-
69
-
70
-
71
-
72
68
artifactory {
73
69
contextUrl = repositoryPath
74
70
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ buildscript {
12
12
classpath ' com.android.tools.build:gradle:7.4.2'
13
13
classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
14
14
15
- classpath " org.jfrog.buildinfo:build-info-extractor-gradle:4.24.20 "
15
+ classpath " org.jfrog.buildinfo:build-info-extractor-gradle:4.33.1 "
16
16
}
17
17
}
18
18
@@ -29,6 +29,10 @@ tasks.register('clean', Delete) {
29
29
delete rootProject. buildDir
30
30
}
31
31
32
+ tasks. register(" version" ) {
33
+ println (versionName)
34
+ }
35
+
32
36
project. ext {
33
37
// libraries
34
38
multidexVersion = " 2.0.1"
You can’t perform that action at this time.
0 commit comments