Skip to content

Commit

Permalink
Move to Ferry v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Prospector committed Jan 24, 2021
1 parent 3d58a17 commit 7176e3a
Show file tree
Hide file tree
Showing 13 changed files with 583 additions and 44 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check_build.yml
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/
15 changes: 0 additions & 15 deletions .github/workflows/gradle_build.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/release_beta.yml
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/
65 changes: 65 additions & 0 deletions .github/workflows/release_major.yml
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/
65 changes: 65 additions & 0 deletions .github/workflows/release_major_beta.yml
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/
65 changes: 65 additions & 0 deletions .github/workflows/release_minor.yml
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/
65 changes: 65 additions & 0 deletions .github/workflows/release_minor_beta.yml
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/
Loading

0 comments on commit 7176e3a

Please sign in to comment.