Skip to content

v6.0.12-alpha

v6.0.12-alpha #10

Workflow file for this run

name: Release Build
env:
CI: true
BUILD_VERSION: ${{ github.event.release.tag_name }}
CHANGELOG: ${{ github.event.release.body }}
PUBLISH: true
# Run when release is created on GitHub
on:
release:
types: [ published ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Clean
uses: gradle/gradle-build-action@v2
with:
arguments: clean
- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
- uses: actions/upload-artifact@v3
with:
name: release-build
path: build/libs/*.jar
- name: Publish to CurseForge and Modrinth
uses: gradle/gradle-build-action@v2
env:
CURSEFORGE_TOKEN: ${{ secrets.TOKEN_CURSEFORGE }}
MODRINTH_TOKEN: ${{ secrets.TOKEN_MODRINTH }}
with:
arguments: publishMod
# TODO: Publish to maven.
- name: Upload to GitHub Releases
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: build/libs/*.jar
- name: Truncate Build Notes
uses: 2428392/[email protected]
id: truncatedChangelog
with:
stringToTruncate: ${{ github.event.release.body }}
maxLength: 1000
- name: Discord Notification Success
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.RELEASE_DISCORD_WEBHOOK }}
embed-title: Ender IO ${{ github.event.release.tag_name }} Released
embed-description: ${{ steps.truncatedChangelog.outputs.string }}
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/enderface.png
username: Ender IO Releases
embed-footer-text: ${{ github.event.release.tag_name }}
embed-url: ${{ github.event.release.html_url }}
embed-color: 5763719
- name: Discord Notification Failure
if: failure()
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.PRIVATE_DISCORD_WEBHOOK }}
embed-title: ${{ github.event.release.tag_name }} build failed
embed-description: The release build is failing at this commit. ```${{ github.event.head_commit.message }}```
avatar-url: https://raw.githubusercontent.com/Team-EnderIO/EnderIO/dev/1.20.1/doc/img/gray-enderface.png
username: Ender IO Release Failure
embed-footer-text: ${{ github.event.release.tag_name }}
embed-url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
embed-color: 15548997
updateReleaseBranch:
needs: [release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get Minecraft Version
uses: madhead/read-java-properties@latest
id: mc_version
with:
file: gradle.properties
property: minecraft_version
- uses: actions/checkout@v3
with:
ref: release/${{ steps.mc_version.outputs.value }}
fetch-depth: 0
- run: |
git config user.name github-actions
git config user.email [email protected]
git merge ${{ github.event.release.tag_name }}
git push