-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d58a17
commit 7176e3a
Showing
13 changed files
with
583 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/ |
Oops, something went wrong.