-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09b7a3c
commit 655d66b
Showing
15 changed files
with
171 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: CD | publication | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ "CI | library & demo app" ] | ||
types: [ completed ] | ||
branches: [ main ] | ||
|
||
jobs: | ||
lib-modules-build: | ||
name: Build library modules | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Official Gradle Wrapper Validation Action | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: adopt | ||
|
||
- name: Set up Gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-gradle-${{ github.run_id }} | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Grant execute permission for gradlew script | ||
run: chmod +x gradlew | ||
|
||
- name: Build all lib modules except demo app | ||
run: ./gradlew build -x :demo-app:build -x check | ||
|
||
publication: | ||
name: Publish library artifacts | ||
runs-on: ubuntu-latest | ||
needs: [ lib-modules-check, demo-app-build ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: adopt | ||
|
||
- name: Set up Gradle cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-gradle-${{ github.run_id }} | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Grant execute permission for gradlew script | ||
run: chmod +x gradlew | ||
|
||
- name: Publish snapshot | ||
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository | ||
|
||
delete-cache: | ||
name: Delete cache | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: [ lib-modules-check, demo-app-build ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Delete cache | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
set +e | ||
gh actions-cache delete ${{ runner.os }}-gradle-${{ github.run_id }} --confirm | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
...ogic/convention/src/main/kotlin/dev/gabrieldrn/konstellation/buildlogic/BuildConstants.kt
This file was deleted.
Oops, something went wrong.
25 changes: 11 additions & 14 deletions
25
build-logic/convention/src/main/kotlin/dev/gabrieldrn/konstellation/buildlogic/Constants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
package dev.gabrieldrn.konstellation.buildlogic | ||
|
||
/** | ||
* Global constants for the build logic. | ||
*/ | ||
@Suppress("UndocumentedPublicProperty") | ||
object Constants { | ||
const val GROUP_ID = "dev.gabrieldrn.konstellation" | ||
const val MAVEN_REPO_NAME = "GitHub" | ||
const val MAVEN_REPO_URL = | ||
"https://maven.pkg.github.com/gabrieldrn/Konstellation" | ||
const val MAVEN_REPO_USERNAME_ENV_KEY = "GPR_USER" | ||
const val MAVEN_REPO_PASSWORD_ENV_KEY = "GPR_KEY" | ||
const val MAVEN_REPO_USERNAME_LOCAL_KEY = "GITHUB_USER" | ||
const val MAVEN_REPO_PASSWORD_LOCAL_KEY = "GITHUB_PERSONAL_ACCESS_TOKEN" | ||
} | ||
import org.gradle.api.JavaVersion | ||
|
||
internal val JAVA_VERSION = JavaVersion.VERSION_17 | ||
internal const val STRICT_API_COMPILER_ARG = "-Xexplicit-api=strict" | ||
|
||
internal const val GROUP_ID = "dev.gabrieldrn.konstellation" | ||
|
||
internal const val MAVEN_REPO_NAME = "GitHubPackages" | ||
internal const val MAVEN_REPO_URL = "https://maven.pkg.github.com/gabrieldrn/Konstellation" | ||
internal const val MAVEN_REPO_USERNAME_ENV_KEY = "gpr.user" | ||
internal const val MAVEN_REPO_PASSWORD_ENV_KEY = "gpr.key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...n/kotlin/dev/gabrieldrn/konstellation/buildlogic/extensions/PublicationConfigExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package dev.gabrieldrn.konstellation.buildlogic.extensions | ||
|
||
open class PublicationConfigExtension( | ||
defaultArtifactId: String = "", | ||
) { | ||
var publicationName: String = "" | ||
var artifactId: String = defaultArtifactId | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
VERSION=0.1.0 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
VERSION=0.1.0 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters