Skip to content

Add shadowJar build #27

Add shadowJar build

Add shadowJar build #27

Workflow file for this run

name: Build DEV Jars
on: [push, pull_request]
jobs:
build_dev_jars:
name: Build DEV jars
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '21'
- name: Build with Gradle
run: |
chmod 777 gradlew
./gradlew shadowJar
git_hash=$(git rev-parse --short "$GITHUB_SHA")
echo "git_hash=$git_hash" >> $GITHUB_ENV
echo "snapshotVersion=5.5-SNAPSHOT" >> $GITHUB_ENV
echo "artifactPath=$(pwd)/builds" >> $GITHUB_ENV
- name: Upload Plugin jar
uses: actions/upload-artifact@v3
with:
name: AywenCraft-${{ env.git_hash }}.jar
path: ${{ env.artifactPath }}/core-1.0-SNAPSHOT-all.jar
- name: Deploy to server
uses: rexlmanu/[email protected]
with:
panel-host: ${{ secrets.PANEL_HOST }}
api-key: ${{ secrets.API_KEY }}
server-id: ${{ secrets.SERVER_ID }}
source: ${{ env.artifactPath }}/core-1.0-SNAPSHOT-all.jar
target: "./plugins/AywenCraft.jar"
restart: true