Skip to content

Add SettingsListerner to register events (#486) #1311

Add SettingsListerner to register events (#486)

Add SettingsListerner to register events (#486) #1311

Workflow file for this run

name: Build DEV Jars
on:
pull_request:
paths-ignore:
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.gitignore'
- 'LICENSE'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'README.md'
push:
paths-ignore:
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.gitignore'
- 'LICENSE'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
- 'README.md'
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
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: AywenCraft-${{ env.git_hash }}.jar
path: ${{ env.artifactPath }}/AywenCraft.jar
- name: Deploy to server
continue-on-error: true
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: rexlmanu/[email protected]
with:
panel-host: ${{ secrets.PANEL_HOST }}
api-key: ${{ secrets.API_KEY }}
server-id: ${{ secrets.SERVER_ID }}
source: ${{ env.artifactPath }}/AywenCraft.jar
target: "./plugins/AywenCraft.jar"
restart: true