Files
KaiijuMC/.github/workflows/release.yml
Sofiane H. Djerbi b5121bd590 Update release.yml
2023-03-22 04:32:32 +01:00

51 lines
1.8 KiB
YAML

name: Release Jars
on: [push, workflow_dispatch]
env:
version: '1.19.4'
branch: ver/1.19.4
jobs:
paperclip:
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repository
uses: actions/checkout@v3
- name: Set up JDK
uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
cache: 'gradle'
distribution: 'GraalVM'
github-token: ${{ secrets.GITHUB_TOKEN }}
version: 'latest'
- 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