Skip to content

0.7.2

0.7.2 #58

Workflow file for this run

name: Release
on:
# Trigger on GitHub UI release creation
release:
types: [published]
# Trigger on branch push for pre-releases
push:
branches: [connect]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for git describe
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build
run: ./gradlew build
- name: Get version
id: version
run: |
VERSION=$(./gradlew properties -q | grep "^version:" | awk '{print $2}')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"
# For release events: upload artifacts to the release
- name: Upload Release Artifacts
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
files: |
spigot/build/libs/connect-spigot.jar
velocity/build/libs/connect-velocity.jar
bungee/build/libs/connect-bungee.jar
LICENSE
# Also update "latest" release with stable file names for download sites
- name: Update Latest Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
with:
tag_name: latest
name: "Latest Release (${{ github.ref_name }})"
prerelease: false
files: |
spigot/build/libs/connect-spigot.jar
velocity/build/libs/connect-velocity.jar
bungee/build/libs/connect-bungee.jar
LICENSE
body: |
Latest stable release.
**Version:** ${{ github.ref_name }}
Download links (stable URLs):
- [connect-spigot.jar](https://github.com/${{ github.repository }}/releases/download/latest/connect-spigot.jar)
- [connect-velocity.jar](https://github.com/${{ github.repository }}/releases/download/latest/connect-velocity.jar)
- [connect-bungee.jar](https://github.com/${{ github.repository }}/releases/download/latest/connect-bungee.jar)
# For branch push: create/update pre-release
- name: Prepare Pre-Release Artifacts
if: github.event_name == 'push'
run: |
mkdir -p prerelease
cp spigot/build/libs/connect-spigot.jar prerelease/connect-spigot-prerelease.jar
cp velocity/build/libs/connect-velocity.jar prerelease/connect-velocity-prerelease.jar
cp bungee/build/libs/connect-bungee.jar prerelease/connect-bungee-prerelease.jar
- name: Update Pre-Release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v1
with:
tag_name: latest-prerelease
name: "Latest Pre-Release (${{ steps.version.outputs.version }})"
prerelease: true
files: |
prerelease/*.jar
LICENSE
body: |
Automated pre-release build from `connect` branch.
**Version:** ${{ steps.version.outputs.version }}
**Commit:** ${{ github.sha }}
⚠️ This is a development build and may be unstable.