From 24f4a7481c93511b7d5eaac0dca83617243a35b8 Mon Sep 17 00:00:00 2001 From: Corey-Dean Arthur <1339555+CoreyD97@users.noreply.github.com> Date: Thu, 17 Feb 2022 11:27:50 +0000 Subject: [PATCH] Update GitHub actions to build release automatically --- .github/workflows/gradle.yml | 33 ------------------------------- .github/workflows/releases.yaml | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 33 deletions(-) delete mode 100644 .github/workflows/gradle.yml create mode 100644 .github/workflows/releases.yaml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index 725e640c..00000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,33 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Java CI with Gradle - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build - - name: Upload artifact - uses: actions/upload-artifact@v1.0.0 - with: - # Artifact name - name: LoggerPlusPlus.jar - # Directory containing files to upload - path: releases diff --git a/.github/workflows/releases.yaml b/.github/workflows/releases.yaml new file mode 100644 index 00000000..40ce0954 --- /dev/null +++ b/.github/workflows/releases.yaml @@ -0,0 +1,35 @@ +--- +name: releases + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout source code + uses: actions/checkout@v2.3.4 + with: + lfs: true + fetch-depth: 0 + + - name: Set up Java + uses: actions/setup-java@v2 + with: + distribution: adopt + java-version: '8' + + # burpsuite_pro.jar is not available, disable tests + - name: Build + run: ./gradlew build -x test + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + releases/*.jar + id: "automatic_releases" \ No newline at end of file