File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Product Deploy
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+
9+ jobs :
10+ Publishing :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Set up Env
18+ run : |
19+ VERSION_NAME=$(grep "versionName" ./version.properties | cut -d "=" -f 2)
20+ echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
21+
22+ echo '${{ secrets.PUBLISH_PROPERTIES }}' | openssl base64 -d -out ./publish.properties
23+
24+ - name : Set up JDK 17
25+ uses : actions/setup-java@v4
26+ with :
27+ java-version : ' 17'
28+ distribution : ' temurin'
29+ cache : gradle
30+
31+ - name : Set up Android SDK (Only on Act)
32+ if : success() && ${{ env.ACT }}
33+ uses : android-actions/setup-android@v3
34+
35+ - name : Publish
36+ run : ./gradlew publish
37+
38+ - name : Release
39+ uses : ncipollo/release-action@v1
40+ with :
41+ tag : v${{ env.VERSION_NAME }}
42+ allowUpdates : true
43+ generateReleaseNotes : true
Original file line number Diff line number Diff line change 1313.externalNativeBuild
1414.cxx
1515local.properties
16- publish.properties
16+ publish.properties
17+ /act
Original file line number Diff line number Diff line change 11# Tue Jul 30 00:34:18 KST 2024
22distributionBase =GRADLE_USER_HOME
33distributionPath =wrapper/dists
4- distributionUrl =https\://services.gradle.org/distributions/gradle-8.6 -bin.zip
4+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.7 -bin.zip
55zipStoreBase =GRADLE_USER_HOME
66zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -31,22 +31,25 @@ android {
3131}
3232
3333publishing {
34- val properties = loadProperties(
34+ val publishProperties = loadProperties(
3535 rootProject.file(" publish.properties" ).path
3636 )
37+ val versionProperties = loadProperties(
38+ rootProject.file(" version.properties" ).path
39+ )
3740 repositories {
38- maven(properties [" githubRepoUrl" ].toString()) {
41+ maven(publishProperties [" githubRepoUrl" ].toString()) {
3942 credentials {
40- username = properties [" githubUserName" ].toString()
41- password = properties [" githubToken" ].toString()
43+ username = publishProperties [" githubUserName" ].toString()
44+ password = publishProperties [" githubToken" ].toString()
4245 }
4346 }
4447 }
4548 publications {
4649 register<MavenPublication >(name) {
47- groupId = properties [" groupId" ].toString()
48- artifactId = properties [" artifactId" ].toString()
49- version = properties [" versionName" ].toString()
50+ groupId = publishProperties [" groupId" ].toString()
51+ artifactId = publishProperties [" artifactId" ].toString()
52+ version = versionProperties [" versionName" ].toString()
5053
5154 afterEvaluate {
5255 from(components[" release" ])
Original file line number Diff line number Diff line change 1+ versionName =1.0.1
You can’t perform that action at this time.
0 commit comments