forked from GeyserMC/Floodgate
-
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.
Add branch name when not master, simplify publish, use GitHub Actions
And updated Gradle
- Loading branch information
Showing
9 changed files
with
79 additions
and
55 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,30 @@ | ||
name: Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository and submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
|
||
- name: Build | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
|
||
- name: Publish | ||
uses: gradle/gradle-build-action@v2 | ||
env: | ||
ORG_GRADLE_PROJECT_geysermcUsername: "${{ secrets.DEPLOY_USER }}" | ||
ORG_GRADLE_PROJECT_geysermcPassword: "${{ secrets.DEPLOY_PASS }}" | ||
with: | ||
arguments: publish |
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
32 changes: 7 additions & 25 deletions
32
build-logic/src/main/kotlin/floodgate.publish-conventions.gradle.kts
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,33 +1,15 @@ | ||
plugins { | ||
id("floodgate.shadow-conventions") | ||
id("com.jfrog.artifactory") | ||
id("maven-publish") | ||
id("net.kyori.indra.publishing") | ||
} | ||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("mavenJava") { | ||
groupId = project.group as String | ||
artifactId = project.name | ||
version = project.version as String | ||
|
||
from(components["java"]) | ||
indra { | ||
configurePublications { | ||
if (shouldAddBranchName()) { | ||
version = versionWithBranchName() | ||
} | ||
} | ||
} | ||
|
||
artifactory { | ||
setContextUrl("https://repo.opencollab.dev/artifactory") | ||
publish { | ||
repository { | ||
setRepoKey(if (isSnapshot()) "maven-snapshots" else "maven-releases") | ||
setMavenCompatible(true) | ||
} | ||
defaults { | ||
publications("mavenJava") | ||
setPublishArtifacts(true) | ||
setPublishPom(true) | ||
setPublishIvy(false) | ||
} | ||
} | ||
publishSnapshotsTo("geysermc", "https://repo.opencollab.dev/artifactory/maven-snapshots") | ||
publishReleasesTo("geysermc", "https://repo.opencollab.dev/artifactory/maven-releases") | ||
} |
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,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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