Compare commits

...

4 Commits

View File

@@ -3,10 +3,11 @@ name: Release Build
on:
release:
types: [ created ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@@ -35,22 +36,37 @@ jobs:
cd packaging
chmod +x package.sh
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
./package.sh -windows
./package.sh
echo "Created artifacts:"
ls -la common/ATCS.jar
ls -la ATCS_${{ env.VERSION }}.zip
- name: Install NSIS
- name: 'Install makensis (apt)'
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
continue-on-error: true
- name: Create Windows-Installer with NSIS
uses: joncloud/makensis-action@v4
with:
script-file: packaging/Windows/ATCS_Installer.nsi
arguments: /DVERSION="${{ env.VERSION }}"
arguments: -DVERSION="${{ env.VERSION }}"
continue-on-error: true
- name: Determine Upload Files
id: check_files_to_upload
shell: bash
run: |
FILES="./packaging/ATCS_${VERSION}.zip"
if [ -f "./packaging/ATCS_${VERSION}_Setup.exe" ]; then
FILES="$FILES ./packaging/ATCS_${VERSION}_Setup.exe"
else
echo "::error::exe-installer created by NSIS was not found; only ZIP will be uploaded."
fi
echo "files=$FILES" >> $GITHUB_OUTPUT
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./packaging/ATCS_${{ env.VERSION }}.zip
./packaging/ATCS_${{ env.VERSION }}_Setup.exe
files: ${{ steps.check_files_to_upload.outputs.files }}