Skip to content

Commit 9a0bb3b

Browse files
committed
Added GitHub Actions
1 parent 1c985f4 commit 9a0bb3b

File tree

8 files changed

+135
-4
lines changed

8 files changed

+135
-4
lines changed

.github/workflows/build-check.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build Check
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
name: Debug build
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v2
21+
with:
22+
distribution: adopt
23+
java-version: 17
24+
25+
- name: Make gradlew executable
26+
run: chmod +x ./gradlew
27+
28+
- name: Build library
29+
run: ./gradlew assembleDebug --stacktrace
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 5 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v4
11+
with:
12+
close-issue-message: 'Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.'
13+
stale-issue-message: 'Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.'
14+
days-before-stale: 90
15+
days-before-close: 7
16+
enable-statistics: true
17+
operations-per-run: 60
18+
exempt-issue-labels: 'acknowledged,needs-triage'
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish Release To Maven Central
2+
3+
on:
4+
# Run this workflow when a new GitHub release is created
5+
# release:
6+
# types: [ released ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
publish:
11+
name: Release build and publish
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v2
19+
with:
20+
distribution: adopt
21+
java-version: 17
22+
23+
- name: Make gradlew executable
24+
run: chmod +x ./gradlew
25+
26+
- name: Publish release
27+
run: ./gradlew closeAndReleaseRepository --no-daemon --no-parallel
28+
env:
29+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
30+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Upload release to Sonatype Staging Repository
2+
3+
# Run this workflow when a tag is pushed
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
workflow_dispatch:
9+
10+
jobs:
11+
publish:
12+
name: Release build and updload
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Set up JDK 17
19+
uses: actions/setup-java@v2
20+
with:
21+
distribution: adopt
22+
java-version: 17
23+
24+
- name: Make gradlew executable
25+
run: chmod +x ./gradlew
26+
27+
- name: Upload release to Sonatype Staging Repository
28+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
29+
env:
30+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
31+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
32+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
34+
#SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
35+
#SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
36+
#SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}

build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ buildscript {
2929
dependencies {
3030
classpath 'com.android.tools.build:gradle:7.2.0'
3131
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
32-
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
32+
// Maven Central Publish
33+
classpath "com.vanniktech:gradle-maven-publish-plugin:0.18.0"
3334
}
3435
}
3536

@@ -41,6 +42,14 @@ allprojects {
4142
}
4243
}
4344

45+
allprojects {
46+
plugins.withId("com.vanniktech.maven.publish") {
47+
mavenPublish {
48+
// sonatypeHost = "S01"
49+
}
50+
}
51+
}
52+
4453
task printProjectProperties {
4554
project.properties.each { println " $it" }
4655
}

core/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4-
// id 'com.vanniktech.maven.publish'
4+
id 'com.vanniktech.maven.publish'
55
}
66

7+
group = GROUP
8+
version = VERSION_NAME
9+
710
android {
811
compileSdk rootProject.ext.compileSdk
912
compileSdkVersion rootProject.ext.compileSdk

sceneform/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4-
// id 'com.vanniktech.maven.publish'
4+
id 'com.vanniktech.maven.publish'
55
}
66

7+
group = GROUP
8+
version = VERSION_NAME
9+
710
android {
811
compileSdk rootProject.ext.compileSdk
912
compileSdkVersion rootProject.ext.compileSdk

ux/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
plugins {
22
id 'com.android.library'
33
id 'kotlin-android'
4-
// id 'com.vanniktech.maven.publish'
4+
id 'com.vanniktech.maven.publish'
55
}
66

7+
group = GROUP
8+
version = VERSION_NAME
9+
710
android {
811
compileSdk rootProject.ext.compileSdk
912
compileSdkVersion rootProject.ext.compileSdk

0 commit comments

Comments
 (0)