Skip to content

Commit

Permalink
PR publishing infrastructure (#87)
Browse files Browse the repository at this point in the history
* PR publishing infrastructure

* Update build.gradle
  • Loading branch information
Matyrobbrt authored Dec 30, 2023
1 parent f555f55 commit 8708fb2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Test
run: ./gradlew --info -s check

- name: Publish artifacts
uses: neoforged/action-pr-publishing/upload@v1

# Always upload test results
- name: Merge Test Reports
if: success() || failure()
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/publish-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# File generated by the GradleUtils `setupGitHubActionsWorkflows` task, avoid modifying it directly
# The template can be found at https://github.com/neoforged/GradleUtils/blob/44d9e09cfa2c6032b84ac40495ea5ab7d64fe521/src/actionsTemplate/resources/.github/workflows/publish-prs.yml

name: Publish PRs to GitHub Packages

on:
workflow_run:
workflows: ['Build Pull Request']
types:
- completed
issue_comment:
types:
- edited
pull_request_target:
types:
- opened

permissions:
packages: write

jobs:
publish-prs:
if: true
uses: neoforged/actions/.github/workflows/publish-prs.yml@main
with:
artifact_base_path: net/neoforged/gradle/
uploader_workflow_name: 'Build Pull Request'
secrets:
PR_PUBLISHING_GH_APP_ID: ${{ secrets.PR_PUBLISHING_GH_APP_ID }}
PR_PUBLISHING_GH_APP_KEY: ${{ secrets.PR_PUBLISHING_GH_APP_KEY }}

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'eclipse'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.neoforged.gradleutils' version '3.0.0-alpha.1'
id 'net.neoforged.gradleutils' version '3.0.0-alpha.10'
}

version = gradleutils.version.toString()
Expand Down Expand Up @@ -219,4 +219,4 @@ subprojects.forEach { subProject ->
}
}
}
}
}
5 changes: 2 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
pluginManagement {
repositories {
gradlePluginPortal()
maven { url = 'https://maven.neoforged.net/releases' }
}
}

plugins {
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}

rootProject.name = 'NeoGradle'
Expand All @@ -29,4 +28,4 @@ subProject 'dsl-mixin'
void subProject(final String name) {
include name
project(":$name").projectDir = new File(rootDir, "${String.join('/', name.split('-'))}")
}
}

0 comments on commit 8708fb2

Please sign in to comment.