From fc315981c1d0fa597eb40d5b9e6370dc54750e96 Mon Sep 17 00:00:00 2001 From: Alexander von Trostorff <19996713+axel1200@users.noreply.github.com> Date: Thu, 16 Jan 2020 17:35:44 +0100 Subject: [PATCH] Feature/#141 ci build (#142) CI build releases --- .github/workflows/release.yml | 39 +++++++++++++++++++ .github/workflows/{gradle.yml => test.yml} | 0 .idea/codeStyles/Project.xml | 24 ++++++++++++ build.gradle | 39 ++++++++++++++++--- gradle.properties | 3 ++ .../treasure/hunt/service/io/FileService.java | 10 +++-- .../treasure/hunt/view/MainController.java | 8 +++- src/main/resources/layout/main.fxml | 3 +- 8 files changed, 115 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/release.yml rename .github/workflows/{gradle.yml => test.yml} (100%) create mode 100644 gradle.properties diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..dc0dd68e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Build and relase + +on: + push: + tags: + - 'v*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: Auto generated release + draft: true + prerelease: false + - name: Build win zip + run: ./gradlew distZip -PprojVersion=${GITHUB_REF##*/} -PjavafxPlatform=win + - name: Build linux tar + run: ./gradlew distTar -PprojVersion=${GITHUB_REF##*/} -PjavafxPlatform=linux + - name: Build mac tar + run: ./gradlew distTar -PprojVersion=${GITHUB_REF##*/} -PjavafxPlatform=mac && ls ./build/distributions + - name: Upload Assets to Release with a wildcard + uses: axel1200/release-asset-action@v1 + with: + pattern: "build/distributions/*" + github-token: ${{ secrets.GITHUB_TOKEN }} + release-url: ${{ steps.create_release.outputs.upload_url }} \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/gradle.yml rename to .github/workflows/test.yml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 02eb89e5..af193ac2 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -1,5 +1,29 @@ + + + + + + + + + + +