From be62bb53d85e98ab5ad65fd5ab246d850ff42c82 Mon Sep 17 00:00:00 2001 From: "Sofiane H. Djerbi" Date: Wed, 15 Feb 2023 16:41:36 +0100 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..73797fa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release Jars +on: workflow_dispatch +env: + version: '1.19.3' + branch: ver/1.19.3 +jobs: + paperclip: + runs-on: ubuntu-latest + steps: + - name: Checkout Git Repository + uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2.5.0 + with: + java-version: '17' + 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" + echo "workflow=$GITHUB_RUN_NUMBER" >> $GITHUB_ENV + - name: Apply Patches + run: ./gradlew applyPatches --stacktrace + - name: Build Paperclip jar + run: ./gradlew createReobfPaperclipJar --stacktrace + - name: Upload Paperclip jar + uses: actions/upload-artifact@v2 + with: + name: kaiiju.jar + path: build/libs/kaiiju-paperclip-*-reobf.jar + - name: Release Paperclip (latest) + 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 + - name: Release Paperclip (History) + if: github.ref_name == env.branch + uses: marvinpinto/action-automatic-releases@latest + with: + title: "Build #${{ env.workflow }}" + automatic_release_tag: build-${{ env.workflow }} + repo_token: "${{ secrets.GITHUB_TOKEN }}" + files: build/libs/kaiiju-paperclip-*-reobf.jar + prerelease: false