From 7176e3a89ec575c69d39c14557bf55447b121dee Mon Sep 17 00:00:00 2001 From: Prospector Date: Sat, 23 Jan 2021 20:42:35 -0800 Subject: [PATCH] Move to Ferry v2.0 --- .github/workflows/check_build.yml | 42 ++++++++++++++ .github/workflows/gradle_build.yml | 15 ----- .github/workflows/release_beta.yml | 71 ++++++++++++++++++++++++ .github/workflows/release_major.yml | 65 ++++++++++++++++++++++ .github/workflows/release_major_beta.yml | 65 ++++++++++++++++++++++ .github/workflows/release_minor.yml | 65 ++++++++++++++++++++++ .github/workflows/release_minor_beta.yml | 65 ++++++++++++++++++++++ .github/workflows/release_patch.yml | 65 ++++++++++++++++++++++ .github/workflows/release_patch_beta.yml | 65 ++++++++++++++++++++++ .github/workflows/release_stable.yml | 66 ++++++++++++++++++++++ Jenkinsfile | 18 ------ build.gradle | 2 +- gradle.properties | 23 ++++---- 13 files changed, 583 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/check_build.yml delete mode 100644 .github/workflows/gradle_build.yml create mode 100644 .github/workflows/release_beta.yml create mode 100644 .github/workflows/release_major.yml create mode 100644 .github/workflows/release_major_beta.yml create mode 100644 .github/workflows/release_minor.yml create mode 100644 .github/workflows/release_minor_beta.yml create mode 100644 .github/workflows/release_patch.yml create mode 100644 .github/workflows/release_patch_beta.yml create mode 100644 .github/workflows/release_stable.yml delete mode 100644 Jenkinsfile diff --git a/.github/workflows/check_build.yml b/.github/workflows/check_build.yml new file mode 100644 index 00000000..3b4a3eda --- /dev/null +++ b/.github/workflows/check_build.yml @@ -0,0 +1,42 @@ +# 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: Check Build +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [ + 1.8, # Minimum + 11, # LTS + 15 # Latest + ] + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: validate gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: make gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: build + run: ./gradlew build --stacktrace --parallel + - name: capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/gradle_build.yml b/.github/workflows/gradle_build.yml deleted file mode 100644 index 2b3d8d64..00000000 --- a/.github/workflows/gradle_build.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Gradle Build - -on: - push: - branches: - - "1.16" -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - run: ./gradlew clean build diff --git a/.github/workflows/release_beta.yml b/.github/workflows/release_beta.yml new file mode 100644 index 00000000..a820a46f --- /dev/null +++ b/.github/workflows/release_beta.yml @@ -0,0 +1,71 @@ +name: Next Beta +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + let oldTag = "${{ steps.previous-tag.outputs.tag }}" + let regex = /[v]?([0-9]+\.[0-9]+\.[0-9]+)+-beta.([0-9]+)[+]?.*/ + if (regex.test(oldTag)) { + let match = oldTag.match(regex) + let betaIncrement = parseInt(match[2], 10) + 1 + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v" + match[1] + "-beta." + betaIncrement, + sha: context.sha + }) + } + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_major.yml b/.github/workflows/release_major.yml new file mode 100644 index 00000000..1caaa994 --- /dev/null +++ b/.github/workflows/release_major.yml @@ -0,0 +1,65 @@ +name: Release Major +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.major }}", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_major_beta.yml b/.github/workflows/release_major_beta.yml new file mode 100644 index 00000000..fde7e3ff --- /dev/null +++ b/.github/workflows/release_major_beta.yml @@ -0,0 +1,65 @@ +name: Beta Major +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.major }}-beta.1", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_minor.yml b/.github/workflows/release_minor.yml new file mode 100644 index 00000000..01eb1ac7 --- /dev/null +++ b/.github/workflows/release_minor.yml @@ -0,0 +1,65 @@ +name: Release Minor +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.minor }}", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_minor_beta.yml b/.github/workflows/release_minor_beta.yml new file mode 100644 index 00000000..c486ab8d --- /dev/null +++ b/.github/workflows/release_minor_beta.yml @@ -0,0 +1,65 @@ +name: Beta Minor +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.minor }}-beta.1", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_patch.yml b/.github/workflows/release_patch.yml new file mode 100644 index 00000000..99dd2572 --- /dev/null +++ b/.github/workflows/release_patch.yml @@ -0,0 +1,65 @@ +name: Release Patch +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.patch }}", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_patch_beta.yml b/.github/workflows/release_patch_beta.yml new file mode 100644 index 00000000..edeb51d0 --- /dev/null +++ b/.github/workflows/release_patch_beta.yml @@ -0,0 +1,65 @@ +name: Beta Patch +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Get SemVer increments + id: semver + uses: WyriHaximus/github-action-next-semvers@v1.0 + with: + version: ${{ steps.previous-tag.outputs.tag }} + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v${{ steps.semver.outputs.patch }}-beta.1", + sha: context.sha + }) + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/.github/workflows/release_stable.yml b/.github/workflows/release_stable.yml new file mode 100644 index 00000000..f619297d --- /dev/null +++ b/.github/workflows/release_stable.yml @@ -0,0 +1,66 @@ +name: Release Stable +on: [workflow_dispatch] # Manual trigger +jobs: + build: + strategy: + matrix: + # Use these Java versions + java: [11] + # and run on both Linux and Windows + os: [ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Get previous tag + id: previous-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Create version tag + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + let oldTag = "${{ steps.previous-tag.outputs.tag }}" + let regex = /[v]?([0-9]+\.[0-9]+\.[0-9]+)+-beta.([0-9]+)[+]?.*/ + if (regex.test(oldTag)) { + let match = oldTag.match(regex) + let betaIncrement = parseInt(match[2], 10) + 1 + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/v" + match[1], + sha: context.sha + }) + } + - name: Fetch tags + run: git fetch --tags + - name: Get current tag + id: current-tag + uses: WyriHaximus/github-action-get-previous-tag@1.0.0 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Setup jdk ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Make Gradle wrapper executable + if: ${{ runner.os != 'Windows' }} + run: chmod +x ./gradlew + - name: Build + run: ./gradlew generateChangelog build publish curseforge github publishModrinth --stacktrace --parallel -PlastTag="${{ steps.previous-tag.outputs.tag }}" -PcurrentTag="${{ steps.current-tag.outputs.tag }}" + env: + MAVEN_URL: ${{ secrets.MAVEN_URL }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_API_KEY }} + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + DISCORD_ANNOUNCEMENT_WEBHOOK: ${{ secrets.DISCORD_ANNOUNCEMENT_WEBHOOK }} + - name: Capture build artifacts + if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS java on one OS + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: build/libs/ diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 605b90af..00000000 --- a/Jenkinsfile +++ /dev/null @@ -1,18 +0,0 @@ -pipeline { - agent any - stages { - stage ('Build') { - when { - branch '1.16.2' - } - steps { - sh "rm -rf build/libs/" - sh "chmod +x gradlew" - sh "./gradlew clean --stacktrace" - sh "./gradlew buildAndAttemptRelease publish --refresh-dependencies --stacktrace" - - archiveArtifacts artifacts: '**/build/libs/*.jar', fingerprint: true - } - } - } -} diff --git a/build.gradle b/build.gradle index 0ecfa386..2939b226 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'fabric-loom' version '0.5-SNAPSHOT' } -apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/1.1/ferry.gradle' +apply from: 'https://raw.githubusercontent.com/TerraformersMC/GradleScripts/2.0/ferry.gradle' dependencies { minecraft "com.mojang:minecraft:${project.minecraft_version}" diff --git a/gradle.properties b/gradle.properties index e0f3aa52..0562caea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,12 @@ org.gradle.jvmargs=-Xmx1G -mod_version=1.3.0 maven_group=com.terraformersmc archive_name=cinderscapes -minecraft_version=1.16.4 -yarn_mappings=1.16.4+build.7 -loader_version=0.10.8 -fabric_version=0.27.1+1.16 +minecraft_version=1.16.5 +yarn_mappings=1.16.5+build.3 +loader_version=0.11.1 +fabric_version=0.29.4+1.16 # Terraform modules terraform_shapes_api_version=1.0.0+build.1 @@ -16,7 +15,7 @@ terraform_wood_api_version=1.0.0+build.1 # Other Things clothconfig_version=4.8.3 autoconfig_version=3.3.1 -modmenu_version=1.14.13+build.21 +modmenu_version=1.14.15 vistas_version=1.0.2+build.7 # Project Metadata @@ -30,25 +29,29 @@ default_release_type=stable # CurseForge Metadata curseforge_slug=cinderscapes curseforge_id=391429 -curseforge_game_versions=1.16.2, 1.16.3, 1.16.4, Fabric +curseforge_game_versions=1.16.5, Fabric curseforge_required_dependencies=fabric-api curseforge_optional_dependencies= +# Modrinth Metadata +modrinth_slug=cinderscapes +modrinth_id=QC4wcUXZ +modrinth_game_versions=1.16.5 +modrinth_mod_loaders=fabric + # Mod Loader Metadata loader_icon=https://fabricmc.net/assets/logo.png loader_name=Fabric # Discord Emotes -project_emote=<:cinderscapes:725012021174730754> curseforge_emote=<:curseforge:698031288845729802> +modrinth_emote=<:modrinth:802414390510354453> github_emote=<:github:698031289223217152> # Webhook Options use_project_username=false # Changelog Options -# changelog_type can either be literal_commits or commit_change_tags -changelog_type=commit_change_tags # changelog_hide_unimportant_commits tries to hide Merge commits at the moment changelog_hide_unimportant_commits=true changelog_max_commit_search=200