diff --git a/.github/workflows/build-prs.yml b/.github/workflows/build-prs.yml new file mode 100644 index 0000000..82f9a95 --- /dev/null +++ b/.github/workflows/build-prs.yml @@ -0,0 +1,24 @@ +# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly +# The template can be found at https://github.com/neoforged/GradleUtils/blob/a65628b0c89dec60b357ce3f8f6bfa62934b8357/src/actionsTemplate/resources/.github/workflows/build-prs.yml + +name: Build and test PRs + +on: + pull_request: + types: + - synchronize + - opened + - ready_for_review + - reopened + push: + branches: + - 'feature/**' + workflow_dispatch: + +jobs: + build: + uses: neoforged/actions/.github/workflows/build-prs.yml@main + with: + java: 17 + gradle_tasks: test + jar_compatibility: false diff --git a/.github/workflows/publish-jcc.yml b/.github/workflows/publish-jcc.yml new file mode 100644 index 0000000..f04c0ea --- /dev/null +++ b/.github/workflows/publish-jcc.yml @@ -0,0 +1,20 @@ +# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly +# The template can be found at https://github.com/neoforged/GradleUtils/blob/a65628b0c89dec60b357ce3f8f6bfa62934b8357/src/actionsTemplate/resources/.github/workflows/publish-jcc.yml + +name: Publish PR JCC output + +on: + workflow_run: + workflows: [Build and test PRs] + types: + - completed + +jobs: + publish-jcc: + if: false # Option not enabled when the workflows were generated + uses: neoforged/actions/.github/workflows/publish-jcc.yml@main + with: + beta_version_pattern: .* # Change this line if there's a clear point at which a version no longer accepts breaking changes + secrets: + JCC_GH_APP_ID: ${{ secrets.JCC_GH_APP_ID }} + JCC_GH_APP_KEY: ${{ secrets.JCC_GH_APP_KEY }} diff --git a/.github/workflows/publish-prs.yml b/.github/workflows/publish-prs.yml new file mode 100644 index 0000000..2a9774e --- /dev/null +++ b/.github/workflows/publish-prs.yml @@ -0,0 +1,29 @@ +# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly +# The template can be found at https://github.com/neoforged/GradleUtils/blob/a65628b0c89dec60b357ce3f8f6bfa62934b8357/src/actionsTemplate/resources/.github/workflows/publish-prs.yml + +name: Publish PRs to GitHub Packages + +on: + workflow_run: + workflows: [Build and test PRs] + types: + - completed + issue_comment: + types: + - edited + pull_request_target: + types: + - opened + +permissions: + packages: write + +jobs: + publish-prs: + if: false # Option not enabled when the workflows were generated + uses: neoforged/actions/.github/workflows/publish-prs.yml@main + with: + artifact_base_path: net/neoforged/DevLaunch/ + secrets: + PR_PUBLISHING_GH_APP_ID: ${{ secrets.PR_PUBLISHING_GH_APP_ID }} + PR_PUBLISHING_GH_APP_KEY: ${{ secrets.PR_PUBLISHING_GH_APP_KEY }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c5e4581 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly +# The template can be found at https://github.com/neoforged/GradleUtils/blob/a65628b0c89dec60b357ce3f8f6bfa62934b8357/src/actionsTemplate/resources/.github/workflows/release.yml + +name: Release + +on: + push: + branches: [ "main" ] + +permissions: + contents: read + statuses: write + +jobs: + release: + uses: neoforged/actions/.github/workflows/gradle-publish.yml@main + with: + java: 17 + pre_gradle_tasks: test + gradle_tasks: publish + secrets: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + MAVEN_USER: ${{ secrets.MAVEN_USER }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + GPG_SUBKEY: ${{ secrets.GPG_SUBKEY }} + GPG_SUBKEY_ID: ${{ secrets.GPG_SUBKEY_ID }} + GPG_SUBKEY_PASSWORD: ${{ secrets.GPG_SUBKEY_PASSWORD }} + \ No newline at end of file diff --git a/build.gradle b/build.gradle index 4c536bd..ab9fe6f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,17 @@ plugins { id 'java' id 'maven-publish' + id "net.neoforged.gradleutils" version "3.0.0-alpha.13" } group = 'net.neoforged' -version = '1.0-SNAPSHOT' +gradleutils.version { + branches.suffixBranch() +} +version = gradleutils.version -repositories { - mavenCentral() +changelog { + from "1.0" } java { @@ -27,20 +31,14 @@ jar { } } -dependencies { - testImplementation platform('org.junit:junit-bom:5.10.0') - testImplementation 'org.junit.jupiter:junit-jupiter' - testImplementation 'org.junit.jupiter:junit-jupiter-params' -} - -test { - useJUnitPlatform() -} - publishing { publications { mavenJava(MavenPublication) { from components.java } } + + repositories { + maven gradleutils.publishingMaven + } } diff --git a/settings.gradle b/settings.gradle index 5cce00f..764092a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,5 @@ -rootProject.name = 'DevLaunch' +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' +} +rootProject.name = 'DevLaunch'