From 3f48a686cc18aff7c1f84ecc0b45493bac5dd1b1 Mon Sep 17 00:00:00 2001 From: sillyangel Date: Sat, 4 Jan 2025 20:31:03 -0600 Subject: [PATCH] fix syntax error for yml --- .github/workflows/build_development.yml | 35 +++++++++++++++++++ .github/workflows/publish.yml | 46 ------------------------- 2 files changed, 35 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/build_development.yml delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build_development.yml b/.github/workflows/build_development.yml new file mode 100644 index 0000000..1d8808c --- /dev/null +++ b/.github/workflows/build_development.yml @@ -0,0 +1,35 @@ +name: Development Builds + +on: + push: # Trigger on every push to the repository + branches: + - main # Specify the branch to run on (e.g., "main") + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4.6.0 + with: + distribution: 'temurin' + java-version: '21' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Build with Gradle + run: ./gradlew build + + - name: Rename build artifact + run: mv build/libs/*.jar build/libs/nuggetmod-dev.jar + + - name: Upload build artifacts + uses: actions/upload-artifact@v4.5.0 + with: + name: nuggetmod-dev + path: build/libs/nuggetmod-dev.jar diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 45a12e4..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Build and Upload JAR - -on: - release: - types: - - published - - edited - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4.6.0 - with: - distribution: 'temurin' - java-version: '21' - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Update mod_version in gradle.properties - run: | - sed -i "s/^mod_version=.*$/mod_version=${{ github.event.release.tag_name }}/" gradle.properties - - - name: Build with Gradle - run: ./gradlew build - - - name: Upload to Modrinth - uses: cloudnode-pro/modrinth-publish@2.0.0 - with: - token: ${{ secrets.MODRINTH_TOKEN }} - project: nuggetmod - name: ${{ github.event.release.name }} - version: ${{ github.event.release.tag_name }} - changelog: ${{ github.event.release.body }} - loaders: |- - forge - game-versions: |- - 1.21.0 - 1.21.1 - files: build/libs/nuggetmod-${{ github.event.release.tag_name }}.jar \ No newline at end of file