diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 1fc0a0a..cb23e04 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -29,9 +29,9 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '17' + java-version-file: .java-version distribution: 'temurin' - id: get_last_version name: Get last version @@ -51,12 +51,15 @@ jobs: name: Reset bump level run: | echo "patch" > .release-info/${{ github.ref_name }}/BUMP_LEVEL - - name: Build with Gradle - uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 - with: - arguments: build test --console=verbose + - name: Wrapper validation + uses: gradle/actions/wrapper-validation@v4 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build and test env: MOD_VERSION: "${{ steps.bump_version.outputs.new_version }}" + run: | + ./gradlew build test --console=verbose - name: Commit version file run: | git config --global user.email "ci@sweetrpg.com" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 56c1fa8..1348c27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,10 +13,10 @@ name: "CodeQL" on: push: - branches: [ 1.18, 1.19, 1.20 ] + branches: [ 1.16, 1.18, 1.19, 1.20, 1.21 ] pull_request: # The branches below must be a subset of the branches above - branches: [ 1.18, 1.19, 1.20 ] + branches: [ 1.16, 1.18, 1.19, 1.20, 1.21 ] schedule: - cron: '17 11 * * 3' diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index a887fb1..4e39711 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -1,9 +1,6 @@ name: Debug on: - create: - tags: - - '*' release: types: - published @@ -11,6 +8,8 @@ on: push: branches: - '*' + tags: + - '*' jobs: debug: diff --git a/.github/workflows/pr-build-release.yml b/.github/workflows/pr-build-release.yml index ad72b8d..930373c 100644 --- a/.github/workflows/pr-build-release.yml +++ b/.github/workflows/pr-build-release.yml @@ -9,7 +9,7 @@ name: PR (Release) on: pull_request: - branches: [ "1.18-release", "1.19-release", "1.20-release" ] + branches: [ "1.16-release", "1.18-release", "1.19-release", "1.20-release", "1.21-release" ] paths: - 'src/**' - 'test/**' @@ -27,11 +27,12 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up JDK 17 - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: - java-version: '17' + java-version-file: .java-version distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 - with: - arguments: build test --console=verbose + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build and test + run: | + ./gradlew build test --console=verbose diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 0278364..406f7f5 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -5,7 +5,7 @@ name: PR on: pull_request: - branches: [ "1.18", "1.19", "1.20" ] + branches: [ "1.16", "1.18", "1.19", "1.20", "1.21" ] paths: - 'src/**' - 'test/**' @@ -22,12 +22,13 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 17 - uses: actions/setup-java@v2 + - name: Set up JDK + uses: actions/setup-java@v4 with: - java-version: '17' + java-version-file: .java-version distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@v3.5.0 - with: - arguments: build test --console=verbose + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build and test + run: | + gradle build test --console=verbose diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5f56544..e1bab7e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ name: Release on: push: - branches: [ "1.18-release", "1.19-release", "1.20-release" ] + branches: [ "1.16-releae", "1.18-release", "1.19-release", "1.20-release", "1.21-release" ] paths: - 'src/**' - 'test/**' @@ -33,35 +33,36 @@ jobs: with: java-version-file: '.java-version' distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Build and test env: CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }} MODRINTH_API_KEY: ${{ secrets.MODRINTH_API_KEY }} - with: - arguments: curseforge modrinth --console=verbose + run: | + ./gradlew curseforge modrinth --console=verbose - name: Commit hash file and reset changelog run: | git config --global user.email "ci@sweetrpg.com" git config --global user.name "SweetRPG CI" - + branch_version=$(echo ${{ github.ref_name }} | cut -f1 -d-) - + echo "${{ github.sha }}" > .release-info/${branch_version}/RELEASE_HASH git add .release-info/${branch_version}/RELEASE_HASH git commit -m "Update ${branch_version} RELEASE_HASH" version=$(cat .release-info/${branch_version}/VERSION) git tag "release-${version}" - + echo "# $version" > CHANGELOG/${branch_version}/${version}.md echo "" >> CHANGELOG/${branch_version}/${version}.md cat CHANGELOG/${branch_version}/current.md >> CHANGELOG/${branch_version}/${version}.md cat /dev/null > CHANGELOG/${branch_version}/current.md git add CHANGELOG/${branch_version} git commit -m "Reset ${branch_version} changelog" - + git push origin --tags - + git checkout ${branch_version} git merge ${{ github.ref_name }} git push origin diff --git a/.gitignore b/.gitignore index dce3d3e..3650f34 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ logs forge*changelog.txt /src/generated/resources/.cache/ .DS_Store +*.java-ish diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/gradle.xml b/.idea/gradle.xml index f9163b4..f2c1963 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -1,9 +1,11 @@ + diff --git a/.idea/runConfigurations/client.xml b/.idea/runConfigurations/client.xml index 797bc88..e8a1cb8 100644 --- a/.idea/runConfigurations/client.xml +++ b/.idea/runConfigurations/client.xml @@ -2,10 +2,10 @@