fixed build process and added project configuration files from idea
Some checks failed
Build the Jar / build (push) Failing after 11s
Some checks failed
Build the Jar / build (push) Failing after 11s
This commit is contained in:
@@ -12,8 +12,43 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 20
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '20'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Create output directories
|
||||
run: |
|
||||
mkdir -p out/production/Calc
|
||||
mkdir -p dist
|
||||
|
||||
- name: Compile Java files
|
||||
run: |
|
||||
javac -encoding UTF-8 -cp "lib/flatlaf-3.7.jar" -d out/production/Calc \
|
||||
$(find src/main/java -name "*.java")
|
||||
|
||||
- name: Copy resources
|
||||
run: |
|
||||
if [ -d "src/main/resources" ]; then
|
||||
cp -r src/main/resources/* out/production/Calc/ 2>/dev/null || true
|
||||
fi
|
||||
|
||||
- name: Create manifest
|
||||
run: |
|
||||
echo "Manifest-Version: 1.0" > manifest.txt
|
||||
echo "Main-Class: dev.sillyangel.calc.Calculator" >> manifest.txt
|
||||
echo "Class-Path: lib/flatlaf-3.7.jar" >> manifest.txt
|
||||
|
||||
- name: Create JAR
|
||||
run: |
|
||||
cd out/production/Calc
|
||||
jar cfm ../../../dist/CalcShortforCalculator.jar ../../../manifest.txt .
|
||||
cd ../../..
|
||||
|
||||
- name: Upload JAR artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: CalcShortforCalculator
|
||||
path: dist/CalcShortforCalculator.jar
|
||||
|
||||
Reference in New Issue
Block a user