forked from neoforged/JavaSourceTransformer
-
-
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.
Merge remote-tracking branch 'origin/main' into feature/hidden-prefixes
- Loading branch information
Showing
14 changed files
with
126 additions
and
182 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Deploy Snapshot | ||
on: | ||
push: | ||
branches: [ 'main' ] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy Snapshot | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Get project version | ||
id: get_version | ||
shell: bash | ||
run: | | ||
project_version=$(./gradlew -q --console=plain printVersion --no-daemon) | ||
echo version=$project_version >> $GITHUB_OUTPUT | ||
- name: Deploy snapshot version | ||
if: endsWith(steps.get_version.outputs.version, '-SNAPSHOT') | ||
run: ./gradlew publish --no-daemon --stacktrace | ||
env: | ||
ORG_GRADLE_PROJECT_paperUsername: ${{ secrets.DEPLOY_USER }} | ||
ORG_GRADLE_PROJECT_paperPassword: ${{ secrets.DEPLOY_PASS }} |
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,33 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
tags: [ 'v*' ] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- uses: gradle/wrapper-validation-action@v2 | ||
- uses: gradle/gradle-build-action@v2 | ||
name: Deploy release | ||
with: | ||
arguments: build publish --no-daemon --stacktrace | ||
env: | ||
ORG_GRADLE_PROJECT_paperUsername: ${{ secrets.DEPLOY_USER }} | ||
ORG_GRADLE_PROJECT_paperPassword: ${{ secrets.DEPLOY_PASS }} | ||
- name: Parse tag | ||
id: vars | ||
run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT | ||
- name: Create release and changelog | ||
uses: MC-Machinations/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
title: restamp ${{ steps.vars.outputs.tag }} | ||
files: | | ||
build/libs/*.jar |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: [ "**" ] | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
# Only run on PRs if the source branch is on someone else's repo | ||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | ||
name: Test | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Execute Gradle build | ||
run: ./gradlew build --no-daemon --stacktrace |
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 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
plugins { | ||
`java-library` | ||
`maven-publish` | ||
} | ||
|
||
java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
|
||
tasks.jar { | ||
manifest { | ||
attributes("Implementation-Version" to project.version) | ||
} | ||
} | ||
|
||
publishing { | ||
repositories { | ||
val url = if (project.version.toString().endsWith("-SNAPSHOT")) { | ||
"https://repo.papermc.io/repository/maven-snapshots/" | ||
} else { | ||
"https://repo.papermc.io/repository/maven-releases/" | ||
} | ||
maven(url) { | ||
credentials(PasswordCredentials::class) | ||
name = "paper" | ||
} | ||
} | ||
|
||
publications.create<MavenPublication>("maven") { | ||
artifactId = "jst" | ||
from(components["java"]) | ||
} | ||
} | ||
|
||
tasks.register("printVersion") { | ||
doFirst { | ||
println(version) | ||
} | ||
} |
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