From a4e65eee1ef15456898c56ee30dd5df2bdaf0757 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sat, 13 Jul 2024 05:43:34 +0100 Subject: [PATCH] Update workflows --- .github/workflows/latest.yml | 2 +- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index f3418da..574506e 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -25,7 +25,7 @@ jobs: cache: "gradle" - name: "Compiling CivVoxelMap" - run: "./gradlew build --no-daemon" + run: "./gradlew build" - uses: "marvinpinto/action-automatic-releases@latest" with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0d72150 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: "CivVoxelMap Release Gradle CI" + +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + release: + runs-on: "ubuntu-latest" + steps: + - uses: "actions/checkout@v3" + + - name: "Set up JDK 17" + uses: "actions/setup-java@v3" + with: + java-version: 17 + distribution: "corretto" + cache: "gradle" + + - name: "Compiling CivVoxelMap" + run: "./gradlew build" + + - name: "Publishing CivVoxelMap" + run: | + gh release upload ${{ github.event.release.tag_name }} "LICENCE" --clobber + for file in $(find "dist/" -maxdepth 1 -type f -name "*.jar"); do + echo "Uploading $file" + gh release upload ${{ github.event.release.tag_name }} "$file" --clobber + done + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}