From 03ea34f98d61f29e1a33f79b3849a868e2067f86 Mon Sep 17 00:00:00 2001 From: Leo G Date: Mon, 9 Mar 2020 14:11:29 +0100 Subject: [PATCH] Final finetuning of github workflows --- .github/workflows/{main.yml => release.yml} | 13 +++++++------ .github/workflows/test.yml | 6 +++++- 2 files changed, 12 insertions(+), 7 deletions(-) rename .github/workflows/{main.yml => release.yml} (76%) diff --git a/.github/workflows/main.yml b/.github/workflows/release.yml similarity index 76% rename from .github/workflows/main.yml rename to .github/workflows/release.yml index 00ec8fc6..a91a091e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ -name: Main Workflow +name: Release Workflow on: - push: - branches: [ master ] + release: + types: [created] jobs: build: @@ -11,12 +11,13 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + server-id: github + settings-path: ${{ github.workspace }} - name: Build with Maven run: | @@ -27,7 +28,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v1 with: - name: AdvancedBan Jar + name: AdvancedBan path: artifact - name: Generate javadocs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df69d328..cc4bc706 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,9 @@ name: Unit tests on: pull_request: - branches: [ master ] + branches: [ master, development ] + push: + branches: [ master, development ] jobs: test: @@ -10,9 +12,11 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Test with Maven run: mvn -B test --file pom.xml