diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..f5832fd --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,34 @@ +# 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: Build JAR for release + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: '16' + distribution: 'adopt' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Build Javadoc + run: ./gradlew javadoc + - name: Upload JAR as an artifact + uses: actions/upload-artifact@v2 + with: + name: Lineation-${{ github.event.release.tag_name }}.jar + path: build/libs/Lineation-${{ github.event.release.tag_name }}.jar + if-no-files-found: error diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c0b85e..ba0e935 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ # 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 +name: Java CI check with Gradle on: push: @@ -27,9 +27,3 @@ jobs: run: ./gradlew build - name: Build Javadoc run: ./gradlew javadoc - - name: Upload JAR as an artifact - uses: actions/upload-artifact@v2 - with: - name: Lineation-1.0.2.jar - path: build/libs/Lineation-1.0.2.jar - if-no-files-found: error diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index a90608f..fdbf653 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -4,7 +4,7 @@ name: Generate Javadoc and publish to gh-pages on: release: - types: [published,edited,created] + types: [published] workflow_dispatch: