Skip to content

Commit

Permalink
Merge pull request #12 from Tofaa2/feat/BuildChainRework
Browse files Browse the repository at this point in the history
[Feat] Gradle Build Chain Rework
  • Loading branch information
Tofaa2 authored Jul 8, 2024
2 parents 69bc235 + 4b9a99d commit 304606b
Show file tree
Hide file tree
Showing 44 changed files with 570 additions and 877 deletions.
73 changes: 43 additions & 30 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package

on:
release:
types: [created]
types: [ created ]

jobs:
build:
Expand All @@ -20,25 +13,45 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle
run: ./gradlew shadowJar

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish to GitHub Packages
run: ./gradlew publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Gradle
run: chmod +x gradlew && ./gradlew build

- name: Upload build artifacts api
uses: actions/upload-artifact@v3
with:
name: api-build
path: api/build/libs

- name: Upload build artifacts common
uses: actions/upload-artifact@v3
with:
name: common-build
path: common/build/libs

- name: Upload build artifacts spigot
uses: actions/upload-artifact@v3
with:
name: spigot-build
path: platforms/spigot/build/libs

- name: Upload build artifacts velocity
uses: actions/upload-artifact@v3
with:
name: spigot-velocity
path: platforms/velocity/build/libs

- name: Upload build artifacts standalone
uses: actions/upload-artifact@v3
with:
name: standalone-build
path: platforms/standalone/build/libs
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ test-plugin/run
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
.idea/
*.iws
*.iml
*.ipr
Expand Down
25 changes: 0 additions & 25 deletions .idea/gradle.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/misc.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

Loading

0 comments on commit 304606b

Please sign in to comment.