From 299b838521df7deab40f108da5be70fd28c9bef5 Mon Sep 17 00:00:00 2001 From: "Sofiane H. Djerbi" Date: Sat, 11 Feb 2023 03:56:39 +0100 Subject: [PATCH] Auto release builds --- .github/workflows/build.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d53a64..24648d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,8 @@ name: Generate Jars on: [ push, pull_request ] +env: + version: '1.19.3' + branch: ver/1.19.3 jobs: paperclip: runs-on: ubuntu-latest @@ -13,7 +16,9 @@ jobs: cache: 'gradle' distribution: 'temurin' - name: Configure Git User Details - run: git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + run: | + git config --global user.email "actions@github.com" && git config --global user.name "Github Actions" + echo "workflow=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV - name: Apply Patches run: ./gradlew applyPatches --stacktrace - name: Build Paperclip jar @@ -23,3 +28,12 @@ jobs: with: name: kaiiju.jar path: build/libs/kaiiju-paperclip-*-reobf.jar + - name: Release Paperclip + if: github.ref_name == env.branch + uses: marvinpinto/action-automatic-releases@latest + with: + title: "Build #${{ env.workflow }}" + automatic_release_tag: latest-${{ env.version }} + repo_token: "${{ secrets.GITHUB_TOKEN }}" + files: build/libs/kaiiju-paperclip-*-reobf.jar + prerelease: false