Skip to content

Commit

Permalink
[*] Fix_2 release_workflow.yml, fix .jar name
Browse files Browse the repository at this point in the history
  • Loading branch information
acdemeg committed Dec 2, 2023
1 parent d70fe5e commit 0ed7e81
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release bot

on: workflow_dispatch
# push:
# tags:
# - '*'
on:
push:
tags:
- '*'

permissions:
contents: write
Expand Down Expand Up @@ -37,6 +37,9 @@ jobs:
with:
node-version: 18

- name: Install caxa deps
run: npm install -g caxa

- name: Prepare release artifact
run: ./create_executable.bat

Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'org.bot'
version '1.0'
version '1.0.0'

java {
toolchain {
Expand Down Expand Up @@ -37,6 +37,8 @@ jar {
manifest {
attributes 'Main-Class': application.mainClass
}
archivesBaseName="FifaBot"
project.version=""
}

tasks.register('runImageLogProducer', JavaExec) {
Expand Down
6 changes: 3 additions & 3 deletions create_executable.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
set JDEPS_COMMAND=jdeps --print-module-deps --ignore-missing-deps .\build\libs\Fifa19Bot-1.0.jar
set JDEPS_COMMAND=jdeps --print-module-deps --ignore-missing-deps .\build\libs\FifaBot.jar
@rem set list needs modules
for /f "delims=" %%i in ('%JDEPS_COMMAND%') do set MODULES=%%i
@rem create minimal runtime
jlink --add-modules %MODULES% --output .\build\AIbotRuntime
@rem move .jar in AIbotRuntime
cp .\build\libs\Fifa19Bot-1.0.jar .\build\AIbotRuntime
cp .\build\libs\FifaBot.jar .\build\AIbotRuntime
@rem create executable file
cd build
npx caxa --input .\AIbotRuntime --output FifaBot.exe --no-include-node -- "{{caxa}}/bin/java" "-jar" "{{caxa}}/FifaBot-1.0.jar"
npx caxa --input .\AIbotRuntime --output FifaBot.exe --no-include-node -- "{{caxa}}/bin/java" "-jar" "{{caxa}}/FifaBot.jar"

0 comments on commit 0ed7e81

Please sign in to comment.