Support up to Minecraft 1.20.6 #46
Workflow file for this run
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
name: release | |
on: | |
push: | |
branches: [ connect ] | |
tags: [ "*.*.*" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
RELEASE_DIR: release | |
LATEST_RELEASE_DIR: latest/release | |
LATEST_PRERELEASE_DIR: latest/prerelease | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Maven | |
run: ./gradlew build | |
- name: Rename JARs for Latest Pre-Release | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: | | |
mkdir -p ${LATEST_PRERELEASE_DIR} | |
cp spigot/build/libs/connect-spigot.jar ${LATEST_PRERELEASE_DIR}/connect-spigot-prerelease.jar | |
cp velocity/build/libs/connect-velocity.jar ${LATEST_PRERELEASE_DIR}/connect-velocity-prerelease.jar | |
cp bungee/build/libs/connect-bungee.jar ${LATEST_PRERELEASE_DIR}/connect-bungee-prerelease.jar | |
- name: Rename JARs for Latest Release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p ${LATEST_RELEASE_DIR} | |
cp spigot/build/libs/connect-spigot.jar ${LATEST_RELEASE_DIR}/connect-spigot.jar | |
cp velocity/build/libs/connect-velocity.jar ${LATEST_RELEASE_DIR}/connect-velocity.jar | |
cp bungee/build/libs/connect-bungee.jar ${LATEST_RELEASE_DIR}/connect-bungee.jar | |
- name: Rename JARs for Release | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p ${RELEASE_DIR} | |
REF=${GITHUB_REF##*/} | |
cp spigot/build/libs/connect-spigot.jar ${RELEASE_DIR}/connect-spigot-${REF}.jar | |
cp velocity/build/libs/connect-velocity.jar ${RELEASE_DIR}/connect-velocity-${REF}.jar | |
cp bungee/build/libs/connect-bungee.jar ${RELEASE_DIR}/connect-bungee-${REF}.jar | |
- name: Latest Pre Release | |
uses: marvinpinto/action-automatic-releases@latest | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
with: | |
repo_token: ${{ secrets.GH_TOKEN }} | |
automatic_release_tag: latest-prerelease | |
prerelease: true | |
title: Latest Pre-Release | |
files: | | |
latest/prerelease/*.jar | |
LICENSE | |
- name: Latest Release | |
uses: marvinpinto/action-automatic-releases@latest | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
repo_token: ${{ secrets.GH_TOKEN }} | |
automatic_release_tag: latest | |
prerelease: false | |
title: Latest Release | |
files: | | |
latest/release/*.jar | |
LICENSE | |
- name: Release version | |
uses: marvinpinto/action-automatic-releases@latest | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
repo_token: ${{ secrets.GH_TOKEN }} | |
prerelease: false | |
files: | | |
release/*.jar | |
LICENSE |