Skip to content

Delete LICENSE.md

Delete LICENSE.md #141

Workflow file for this run

name: Build and Upload Development Artifact to Discord
on:
push:
branches:
- 1.19.4
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD: ${{ github.run_number }}
SHA: ${{ github.sha }}
WEBHOOK: ${{ secrets.BUILD_DISCORD_WEBHOOK }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Read version from version.properties
id: read-version
run: |
VERSION=$(grep -oP '(?<=version=).*$' version.properties)
echo "::set-output name=version::$VERSION"
- name: Rename the built jar
run: mv build/libs/toastclient-${{ steps.read-version.outputs.version }}.jar toastclient-${{ github.run_number }}.jar
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: toastclient-${{ github.run_number }}
path: toastclient-${{ github.run_number }}.jar
- name: Get branch name
uses: nelonoel/branch-name@v1.0.1
id: branch
- name: Send Discord build message
run: |
COMMIT_MESSAGES=$(git log --pretty=format:'- `%h` %s' -5 --reverse)
(curl "$WEBHOOK" -sS -H "Content-Type:application/json" -X POST -d "{\"content\":null,\"embeds\":[{\"title\":\"Build $BUILD\",\"description\":\"**Branch:** $BRANCH_NAME\\n**Changes:**\\n$COMMIT_MESSAGES\",\"url\":\"https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID\",\"color\":1487872,\"fields\":[{\"name\":\"Artifacts:\",\"value\":\"- [toastclient-$BUILD.zip](https://nightly.link/$GITHUB_REPOSITORY/workflows/gradle.yaml/$BRANCH_NAME/toastclient-$BUILD.zip)\"}],\"footer\":{\"text\":\"$GITHUB_REPOSITORY\"}}]}")