Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Make gradlew executable
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
22 changes: 22 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Gradle package

on: [workflow_dispatch]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Make gradlew executable
run: chmod +x gradlew
- name: Publish with Gradle
run: ./gradlew publish
env:
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ run/
runs/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
gradle.properties
!gradle-wrapper.jar
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ publishing {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Touchie771/MinecraftGUI")
credentials {
username = project.findProperty("user") ?: System.getenv("USERNAME")
password = project.findProperty("key") ?: System.getenv("TOKEN")
username = System.getenv("PUBLISH_USER")
password = System.getenv("PUBLISH_PASSWORD")
}
}
}
Expand Down