-
Notifications
You must be signed in to change notification settings - Fork 9
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
6ba3046
commit b8e7b58
Showing
11 changed files
with
549 additions
and
16 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
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/[email protected] | ||
- name: Get SemVer increments | ||
id: semver | ||
uses: WyriHaximus/[email protected] | ||
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/[email protected] | ||
- 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/[email protected] | ||
- name: Get SemVer increments | ||
id: semver | ||
uses: WyriHaximus/[email protected] | ||
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/[email protected] | ||
- 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/[email protected] | ||
- name: Get SemVer increments | ||
id: semver | ||
uses: WyriHaximus/[email protected] | ||
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/[email protected] | ||
- 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/[email protected] | ||
- name: Get SemVer increments | ||
id: semver | ||
uses: WyriHaximus/[email protected] | ||
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/[email protected] | ||
- 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/[email protected] | ||
- name: Get SemVer increments | ||
id: semver | ||
uses: WyriHaximus/[email protected] | ||
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/[email protected] | ||
- 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.