mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
Compare commits
5 Commits
miss-effec
...
fix-releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8399ae60ee | ||
|
|
1b643f4aa1 | ||
|
|
4293095e8e | ||
|
|
5f2927e00c | ||
|
|
79eddde155 |
97
.github/workflows/release.yml
vendored
97
.github/workflows/release.yml
vendored
@@ -2,55 +2,68 @@ 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: Upload Release Assets (zip)
|
||||||
uses: joncloud/makensis-action@v4
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
env:
|
||||||
script-file: packaging/Windows/ATCS_Installer.nsi
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
arguments: /DVERSION="${{ env.VERSION }}"
|
with:
|
||||||
|
files: |
|
||||||
|
./packaging/ATCS_${{ env.VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload Release Assets
|
- name: 'Install makensis (apt)'
|
||||||
uses: softprops/action-gh-release@v1
|
run: sudo apt update && sudo apt install -y nsis nsis-pluginapi
|
||||||
env:
|
continue-on-error: true
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
- name: Create Windows-Installer with NSIS
|
||||||
files: |
|
uses: joncloud/makensis-action@v4
|
||||||
./packaging/ATCS_${{ env.VERSION }}.zip
|
with:
|
||||||
./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||||
|
arguments: -DVERSION="${{ env.VERSION }}"
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Upload Release Assets (exe)
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
files: ./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
||||||
|
continue-on-error: true
|
||||||
|
|||||||
Reference in New Issue
Block a user