diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 428212f..85c6207 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,75 +28,6 @@ jobs: outputs: release_upload_url: ${{ steps.export_vars.outputs.release_upload_url }} - build-java-8: - needs: create-release - runs-on: ubuntu-latest - steps: - #Checkout - - uses: actions/checkout@v2 - #Setup Java 8 - - name: Set up Java 8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - # create directory for buildtools - - name: Create directory for BuildTools - run: mkdir -p /tmp/buildtools/1_16_R2 /tmp/buildtools/1_16_R3 - - #Get BuildTools - - name: BuildTools - run: curl -o /tmp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar - - #Spigot 1_16_R2 - - name: Spigot 1_16_R2 BuildTools - run: cp /tmp/BuildTools.jar /tmp/buildtools/1_16_R2/BuildTools.jar - - - name: Build Spigot 1_16_R2 - run: cd /tmp/buildtools/1_16_R2 && java -jar /tmp/buildtools/1_16_R2/BuildTools.jar --rev 1.16.2 - - #Spigot 1_16_R3 - - name: Spigot 1_16_R3 BuildTools - run: cp /tmp/BuildTools.jar /tmp/buildtools/1_16_R3/BuildTools.jar - - - name: Build Spigot 1_16_R3 - run: cd /tmp/buildtools/1_16_R3 && java -jar /tmp/buildtools/1_16_R2/BuildTools.jar --rev 1.16.4 - - #Change version numbers in build.gradle - - name: Change source compatibility - run: sed -i 's/sourceCompatibility = 1.11/sourceCompatibility = 1.8/' build.gradle - - - name: Change target compatibility - run: sed -i 's/targetCompatibility = 1.11/targetCompatibility = 1.8/' build.gradle - - #Apply permissions for Gradle, so that ./gradlew can run - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - #Build the JAR - - name: Build with Gradle - run: ./gradlew ghActions - - #Extract version number - - name: Extract version number - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - #Extract repository name - - name: Extract repository name - run: echo "REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")" >> $GITHUB_ENV - - #Attach compiled JAR to Release - - name: Attach JAR to Release - id: upload_release_asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.create-release.outputs.release_upload_url }} - asset_path: actions/output.jar - asset_name: ${{ env.REPOSITORY_NAME }}-${{ env.RELEASE_VERSION }}-RELEASE-JAVA-8.jar - asset_content_type: application/java- - build-java-11: needs: create-release runs-on: ubuntu-latest @@ -110,28 +41,6 @@ jobs: with: java-version: 1.11 - # create directory for buildtools - - name: Create directory for BuildTools - run: mkdir -p /tmp/buildtools/1_16_R2 /tmp/buildtools/1_16_R3 - - #Get BuildTools - - name: BuildTools - run: curl -o /tmp/BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar - - #Spigot 1_16_R2 - - name: Spigot 1_16_R2 BuildTools - run: cp /tmp/BuildTools.jar /tmp/buildtools/1_16_R2/BuildTools.jar - - - name: Build Spigot 1_16_R2 - run: cd /tmp/buildtools/1_16_R2 && java -jar /tmp/buildtools/1_16_R2/BuildTools.jar --rev 1.16.2 - - #Spigot 1_16_R3 - - name: Spigot 1_16_R3 BuildTools - run: cp /tmp/BuildTools.jar /tmp/buildtools/1_16_R3/BuildTools.jar - - - name: Build Spigot 1_16_R3 - run: cd /tmp/buildtools/1_16_R3 && java -jar /tmp/buildtools/1_16_R2/BuildTools.jar --rev 1.16.4 - #Apply permissions for Gradle, so that ./gradlew can run - name: Grant execute permission for gradlew run: chmod +x gradlew