Compare commits

...

3 Commits

2 changed files with 25 additions and 14 deletions

View File

@@ -11,6 +11,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Get Version
id: get_version
shell: bash
run: |
echo "Reading version from file:"
cat packaging/ATCS_latest
VERSION=$(cat packaging/ATCS_latest | sed 's/^v//' | sed 's/[^0-9.]//g')
echo "Processed version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Environment variable set to: $VERSION"
- name: Set up JDK
uses: actions/setup-java@v2
with:
@@ -23,22 +34,23 @@ jobs:
- name: Build JAR
shell: bash
run: |
cd ATCS/packaging
cd packaging
chmod +x package.sh
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
./package.sh -windows
echo "Created artifacts:"
ls -la ATCS_${{ env.VERSION }}.zip
ls -la common/ATCS.jar
- name: Create Installer
shell: bash
run: |
cd ATCS/packaging/Windows
makensis ATCS_Installer.nsi
- name: Get Version
id: get_version
shell: bash
run: |
VERSION=$(cat ATCS/packaging/ATCS_latest | sed 's/^v//')
echo "VERSION=$VERSION" >> $GITHUB_ENV
cd packaging/Windows
ls -la
echo "Building installer for version: ${{ env.VERSION }}"
makensis /DVERSION="${{ env.VERSION }}" ATCS_Installer.nsi
echo "Created installer:"
ls -la ATCS_v${{ env.VERSION }}_Setup.exe
- name: Upload ZIP to Release
uses: actions/upload-release-asset@v1
@@ -46,7 +58,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./ATCS/packaging/ATCS_${{ env.VERSION }}.zip
asset_path: ./packaging/ATCS_${{ env.VERSION }}.zip
asset_name: ATCS_${{ env.VERSION }}.zip
asset_content_type: application/zip
@@ -56,6 +68,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./ATCS/packaging/Windows/ATCS_v${{ env.VERSION }}_Setup.exe
asset_path: ./packaging/Windows/ATCS_v${{ env.VERSION }}_Setup.exe
asset_name: ATCS_v${{ env.VERSION }}_Setup.exe
asset_content_type: application/octet-stream

View File

@@ -1,7 +1,6 @@
!include MUI2.nsh
!system 'for /f "delims=" %%a in ('type ..\ATCS_latest') do set "VERSION=%%a" && exit'
!define VERSION "$%VERSION:~1%"
; Version will be passed as /DVERSION=x.x.x
!define TRAINER_VERSION "0.1.5"
!define JAVA_BIN "java"
!define ATCS_SOURCE_DIR "..\..\"