fix: please oh my god #480
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: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
GITHUB_ACTOR: ${{ github.actor }} | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set Gradle file to be executable | |
run: chmod +x gradlew | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Store original JAR name as output and rename JAR | |
id: jar-name | |
working-directory: build/libs | |
run: | | |
filename=$(echo $(ls | head -n 1 | sed 's/\.[^.]*$//')) | |
echo "ARTIFACT_NAME=$(echo $filename)" >> $GITHUB_OUTPUT | |
echo "Stored artifact name as \"$filename\""; | |
mv $filename.jar $filename-bleeding-edge.jar | |
- name: Upload JAR | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ steps.jar-name.outputs.ARTIFACT_NAME }}-EXTRACT-ME" | |
path: "build/libs/*" |