From be9ed4cfbaefe98cd06bf33da18ff79f02c61e67 Mon Sep 17 00:00:00 2001 From: woodiertexas Date: Wed, 8 Jan 2025 01:54:29 -0800 Subject: [PATCH] update editorconfig and publishing --- .editorconfig | 4 ++++ .github/workflows/gradle.yml | 15 +++++---------- .github/workflows/publish.yml | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index 4ee6c5e..d780c86 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = false indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 5f55b80..e7d3bd9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,8 +1,3 @@ -# Automatically build the project and run any configured tests for every push -# and submitted pull request. This can help catch issues that only occur on -# certain platforms or Java versions, and provides a first line of defence -# against bad commits. - name: build on: push: @@ -22,13 +17,13 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - name: validate gradle wrapper - uses: gradle/wrapper-validation-action@v1 + uses: gradle/wrapper-validation-action@v4 - name: cache gradle - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -37,14 +32,14 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - name: setup jdk 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - name: build run: ./gradlew build --no-daemon - name: capture build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Artifacts path: build/libs/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index de1a34f..75bdcd6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,21 +9,21 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-java@v3 + + - uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 + - name: Build and publish with Gradle - run: ./gradlew modrinth publish - env: - BUILD_RELEASE: ${{github.event.prelease == false}} - MODRINTH_TOKEN: ${{secrets.MODRINTH}} - CHANGELOG: ${{ github.event.release.body }} - - name: Upload build artifacts - uses: AButler/upload-release-assets@v2.0 + run: ./gradlew assemble + + - uses: Kir-Antipov/mc-publish@995edadc13559a8b28d0b7e6571229f067ec7659 with: - files: 'build/libs/*; build/libs/*-sources.jar; !build/libs/*-dev.jar' - repo-token: ${{secrets.GITHUB_TOKEN}} + modrinth-id: dBOB3VZD + modrinth-token: ${{ secrets.MODRINTH }} + + github-token: ${{ secrets.GITHUB_TOKEN }}