Skip to content

commint

commint #16

Workflow file for this run

name: Java CI/CD
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Install Gradle
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('build.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build JAR
run: ./gradlew dist
- name: Find .jar file
run: find . -type f -name "CoreBot.jar"
- name: Rename .jar file to prevent confusion with old bot
run: mv ./build/libs/CoreBot.jar ./build/libs/Message.jar
- name: Upload a Build Artifact To GitHub
uses: actions/[email protected]
with:
path: build/libs/Message.jar
- name: Deploy File To Cerg Host
uses: wlixcc/[email protected]
with:
username: ${{ secrets.HOST_USERNAME }}
server: ${{ secrets.HOST_SERVER_IP }}
password: ${{ secrets.HOST_PASSWORD }}
local_path: './build/libs/Message.jar'
remote_path: '/home/cergc/bots/CoreBot/build/libs'
sftpArgs: '-o ConnectTimeout=5'