documentation: Fix typo in changelog #900
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: Java CI with Gradle | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get branch name | |
id: get_branch | |
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
- name: Get latest commit hash | |
id: get_hash | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Get MC version | |
uses: christian-draeger/read-properties@908f99d3334be3802ec7cb528395a69d19914e7b | |
id: read_properties | |
with: | |
path: gradle.properties | |
properties: minecraft_version enabled_platforms mod_version archives_base_name | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@9aa31f26bc8e536d1faf4b332bb8365350743a18 | |
- name: Build jar | |
uses: gradle/[email protected] | |
with: | |
arguments: build | |
gradle-home-cache-includes: | | |
caches | |
loom-cache | |
- name: Publish to GitHub Packages | |
if: github.event_name == 'push' && github.repository_id == '510859946' | |
continue-on-error: true | |
uses: gradle/[email protected] | |
with: | |
arguments: publishMavenJavaPublicationToGitHubPackagesRepository | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to realRobotix Maven | |
if: github.event_name == 'push' && github.repository_id == '510859946' | |
uses: gradle/[email protected] | |
with: | |
arguments: | | |
publishMavenJavaPublicationToRealRobotixMavenRepository | |
-PrealRobotixMavenUsername=${{ secrets.MAVEN_USER }} | |
-PrealRobotixMavenPassword=${{ secrets.MAVEN_ACCESS_TOKEN }} | |
- name: Send building message to discord | |
if: github.event_name == 'push' && github.repository_id == '510859946' | |
uses: realRobotix/action-discord-notifier@release-master | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
message-title: Building mod from branch ${{ steps.get_branch.outputs.branch }} | |
- name: Find jars | |
id: find_jars | |
run: | | |
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | |
echo "jars<<$EOF" >> $GITHUB_OUTPUT | |
find . -regextype posix-extended -regex "\.\/($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))\/build\/libs\/${{ steps.read_properties.outputs.archives_base_name }}-($(tr "," "|" <<< ${{ steps.read_properties.outputs.enabled_platforms }}))-${{ steps.read_properties.outputs.minecraft_version }}-${{ steps.read_properties.outputs.mod_version }}-nightly-${{ steps.get_hash.outputs.sha_short }}.jar" >> $GITHUB_OUTPUT | |
echo "$EOF" >> $GITHUB_OUTPUT | |
- name: Send built file to discord | |
if: github.event_name == 'push' && github.repository_id == '510859946' | |
uses: sinshutu/upload-to-discord@master | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
with: | |
args: ${{ steps.find_jars.outputs.jars }} | |
- name: Archive Artifacts | |
uses: actions/[email protected] | |
with: | |
name: ${{ steps.read_properties.outputs.archives_base_name }}-${{ steps.read_properties.outputs.minecraft_version }}-${{ steps.read_properties.outputs.mod_version }}-nightly-${{ steps.get_hash.outputs.sha_short }} | |
path: ${{ steps.find_jars.outputs.jars }} |