-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
45 additions
and
33 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 |
---|---|---|
@@ -1,16 +1,36 @@ | ||
--- | ||
name: Build | ||
name: 'Build & Publish' | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- "release-*.*.*" | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
uses: metaborg/actions/.github/workflows/gradle-build-matrix.yaml@main | ||
publish-snapshot: | ||
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main | ||
with: | ||
gradle-command: | | ||
gradle :publish -Pgitonium.isSnapshot=true | ||
gradle-version-command: | | ||
gradle -q :printVersion -Pgitonium.isSnapshot=true | ||
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'" | ||
needs: [build] | ||
secrets: | ||
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} | ||
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} | ||
publish-release: | ||
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main | ||
with: | ||
gradle-command: | | ||
gradle :publish | ||
gradle-version-command: | | ||
gradle -q :printVersion | ||
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')" | ||
needs: [build] | ||
secrets: | ||
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} | ||
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import org.metaborg.convention.Developer | ||
import org.metaborg.convention.MavenPublishConventionExtension | ||
|
||
// Workaround for issue: https://youtrack.jetbrains.com/issue/KTIJ-19369 | ||
|
@@ -7,15 +8,34 @@ plugins { | |
alias(libs.plugins.gitonium) | ||
} | ||
|
||
rootProjectConvention { | ||
// This will add `publishAll` and `publish` tasks that call the `publish` task on each subproject and sub-build | ||
registerPublishTasks.set(true) | ||
} | ||
|
||
allprojects { | ||
apply(plugin = "org.metaborg.gitonium") | ||
|
||
// Configure Gitonium before setting the version | ||
gitonium { | ||
mainBranch.set("master") | ||
} | ||
|
||
version = gitonium.version | ||
group = "org.metaborg" | ||
|
||
pluginManager.withPlugin("org.metaborg.convention.maven-publish") { | ||
extensions.configure(MavenPublishConventionExtension::class.java) { | ||
repoOwner.set("metaborg") | ||
repoName.set("common") | ||
|
||
metadata { | ||
inceptionYear.set("2018") | ||
developers.set(listOf( | ||
Developer("gohla", "Gabriel Konat", "[email protected]"), | ||
Developer("virtlink", "Daniel A. A. Pelsmaeker", "[email protected]"), | ||
)) | ||
} | ||
} | ||
} | ||
} |