2024-08-08 21:22:50 +02:00
|
|
|
name: Build playerservers-edits
|
|
|
|
run-name: Build playerservers-edits latest Jar
|
2024-08-08 20:46:48 +02:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
Build-latest-jar:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Build | Prepare packages
|
|
|
|
run: |
|
|
|
|
apt update; apt-get install software-properties-common -y
|
|
|
|
wget -O- https://apt.corretto.aws/corretto.key | apt-key add -
|
|
|
|
add-apt-repository 'deb https://apt.corretto.aws stable main'
|
2024-08-08 21:27:07 +02:00
|
|
|
apt-get update; apt-get install -y maven java-21-amazon-corretto-jdk
|
2024-08-08 20:46:48 +02:00
|
|
|
- name: Setup git
|
|
|
|
run: |
|
|
|
|
git config --global user.name "Radim Lipovčan"
|
|
|
|
git config --global user.email "radim@lipovcan.cz"
|
|
|
|
- name: Build | Clone repository
|
|
|
|
run: |
|
2024-09-05 17:32:34 +02:00
|
|
|
git clone https://ownercz:${{ secrets.CLONE_GITEA_TOKEN }}@git.lipovcan.cz/PlayerServers/PlayerServers-Source.git
|
2024-08-08 21:22:50 +02:00
|
|
|
cd playerservers-edits && ls -lah
|
2024-08-08 20:46:48 +02:00
|
|
|
- name: Build | Gradlew build
|
|
|
|
run: |
|
2024-09-05 17:32:34 +02:00
|
|
|
cd playerservers-edits && ls -lah && git checkout main
|
2024-08-08 20:46:48 +02:00
|
|
|
mvn clean install && ls -lah && ls */ -lah && ls */* -lah&& ls */*/* -lah
|
|
|
|
- name: Build | publish jar
|
|
|
|
run: |
|
2024-09-05 17:32:34 +02:00
|
|
|
tar -czf playerservers-main-$(date +"%H-%M--%d-%m-%Y").tar.gz playerservers-edits/
|
|
|
|
curl --insecure --user username:mypass -T playerservers-main-$(date +"%H-%M--%d-%m-%Y").tar.gz ftp://192.168.10.133:/
|
2024-08-08 20:46:48 +02:00
|
|
|
|