RESTfulMC/.gitea/workflows/deploy-demo-plugin.yml

53 lines
1.3 KiB
YAML
Raw Normal View History

2024-04-24 16:37:19 -07:00
name: Deploy Demo Plugin
on:
push:
branches: ["master"]
2024-04-25 14:03:40 -07:00
paths:
[
".gitea/workflows/deploy-demo-plugin.yml",
"DemoSpigotPlugin/**",
"!DemoSpigotPlugin/README.md",
]
2024-04-24 16:37:19 -07:00
jobs:
docker:
strategy:
matrix:
java-version: ["17"]
maven-version: ["3.8.5"]
runs-on: "ubuntu-latest"
defaults:
run:
working-directory: "./DemoSpigotPlugin"
# Steps to run
steps:
# Checkout the repo
- name: Checkout
uses: actions/checkout@v4
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.12.0
with:
java-version: ${{ matrix.java-version }}
distribution: "zulu"
maven-version: ${{ matrix.maven-version }}
# Build and package the jar
- name: Build Jar
run: mvn clean package -q -T4C
2024-04-25 14:16:10 -07:00
# Upload the built jar to the
# remote server and restart it
- name: Upload Jar and Restart Remote Server
2024-04-25 14:17:25 -07:00
uses: rexlmanu/pterodactyl-upload-action@v2.1
2024-04-24 16:43:08 -07:00
with:
2024-04-25 14:16:10 -07:00
panel-host: ${{ secrets.PTERO_URL }}
2024-04-24 16:37:19 -07:00
api-key: ${{ secrets.PTERO_API_KEY }}
2024-04-25 14:03:40 -07:00
server-id: ${{ secrets.DEMO_SERVER_ID }}
2024-04-25 14:16:10 -07:00
source: "./target/DemoSpigotPlugin.jar"
target: "./plugins"
restart: true # Restart after upload