diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c383f09..e228aab 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,12 +1,8 @@ --- -name: Build +name: 'Build & Publish' on: # yamllint disable-line rule:truthy push: - branches: - - master - tags: - - "release-*.*.*" pull_request: branches: - master @@ -14,3 +10,27 @@ on: # yamllint disable-line rule:truthy 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 }} diff --git a/.github/workflows/dependencies.yaml b/.github/workflows/dependencies.yaml deleted file mode 100644 index 2dfa0ef..0000000 --- a/.github/workflows/dependencies.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: 'Submit Dependencies' - -on: # yamllint disable-line rule:truthy - push: - branches: - - master - -jobs: - build: - uses: metaborg/actions/.github/workflows/gradle-dependencies.yaml@main diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 40f8533..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: 'Publish' - -on: # yamllint disable-line rule:truthy - push: - tags: - - "release-*.*.*" - -jobs: - build: - uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main - secrets: - METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }} - METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }} - # SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} - # SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} - # SIGNING_KEY: ${{ secrets.SIGNING_KEY }} diff --git a/build.gradle.kts b/build.gradle.kts index 775c293..f921db9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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,8 +8,19 @@ 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" @@ -16,6 +28,14 @@ allprojects { extensions.configure(MavenPublishConventionExtension::class.java) { repoOwner.set("metaborg") repoName.set("common") + + metadata { + inceptionYear.set("2018") + developers.set(listOf( + Developer("gohla", "Gabriel Konat", "g.d.p.konat@tudelft.nl"), + Developer("virtlink", "Daniel A. A. Pelsmaeker", "d.a.a.pelsmaeker@tudelft.nl"), + )) + } } } }