mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-01-07 20:12:35 +01:00
Compare commits
4 Commits
miss-effec
...
v0.6.23-pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b643f4aa1 | ||
|
|
4293095e8e | ||
|
|
5f2927e00c | ||
|
|
79eddde155 |
100
.github/workflows/release.yml
vendored
100
.github/workflows/release.yml
vendored
@@ -2,55 +2,71 @@ name: Release Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [created]
|
types: [ created ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: get_version
|
id: get_version
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Reading version from file:"
|
echo "Reading version from file:"
|
||||||
cat res/ATCS_latest
|
cat res/ATCS_latest
|
||||||
echo ""
|
echo ""
|
||||||
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
|
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
|
||||||
echo "Processed version: $VERSION"
|
echo "Processed version: $VERSION"
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
echo "Environment variable set to: $VERSION"
|
echo "Environment variable set to: $VERSION"
|
||||||
|
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Build JAR
|
- name: Build JAR
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd packaging
|
cd packaging
|
||||||
chmod +x package.sh
|
chmod +x package.sh
|
||||||
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
|
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
|
||||||
./package.sh -windows
|
./package.sh
|
||||||
echo "Created artifacts:"
|
echo "Created artifacts:"
|
||||||
ls -la common/ATCS.jar
|
ls -la common/ATCS.jar
|
||||||
ls -la ATCS_${{ env.VERSION }}.zip
|
ls -la ATCS_${{ env.VERSION }}.zip
|
||||||
|
|
||||||
- name: Install NSIS
|
- name: 'Install makensis (apt)'
|
||||||
uses: joncloud/makensis-action@v4
|
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
|
||||||
with:
|
continue-on-error: true
|
||||||
script-file: packaging/Windows/ATCS_Installer.nsi
|
|
||||||
arguments: /DVERSION="${{ env.VERSION }}"
|
|
||||||
|
|
||||||
- name: Upload Release Assets
|
- name: Create Windows-Installer with NSIS
|
||||||
uses: softprops/action-gh-release@v1
|
uses: joncloud/makensis-action@v4
|
||||||
env:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||||
with:
|
arguments: -DVERSION="${{ env.VERSION }}"
|
||||||
files: |
|
continue-on-error: true
|
||||||
./packaging/ATCS_${{ env.VERSION }}.zip
|
|
||||||
./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
- 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: ${{ steps.check_files_to_upload.outputs.files }}
|
||||||
|
|||||||
Reference in New Issue
Block a user