Create release.yml
This commit is contained in:
committed by
GitHub
parent
335bab0db8
commit
be62bb53d8
48
.github/workflows/release.yml
vendored
Normal file
48
.github/workflows/release.yml
vendored
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user