1.3-mc1_21_10-beta.2 #9
Workflow file for this run
This file contains hidden or 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: Release Build | |
| on: | |
| release: | |
| types: [created] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Build Spigot with BuildTools | |
| run: | | |
| mkdir -p buildtools | |
| cd buildtools | |
| wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar | |
| java -jar BuildTools.jar --rev 1.21.11 --remapped | |
| cd .. | |
| timeout-minutes: 30 | |
| - name: Build with Maven | |
| run: mvn clean package | |
| - name: Find JAR file | |
| id: find_jar | |
| run: | | |
| JAR_FILE=$(ls target/*.jar | grep -v 'remapped-obf.jar' | grep -v 'original-' | tail -n 1) | |
| echo "jar_file=$JAR_FILE" >> $GITHUB_OUTPUT | |
| echo "jar_name=$(basename $JAR_FILE)" >> $GITHUB_OUTPUT | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ${{ steps.find_jar.outputs.jar_file }} | |
| asset_name: ${{ steps.find_jar.outputs.jar_name }} | |
| asset_content_type: application/java-archive |