mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
Add GitHub Actions workflow for automated release builds
This commit is contained in:
61
.github/workflows/release.yml
vendored
Normal file
61
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Install NSIS
|
||||
uses: joncloud/makensis-action@v4
|
||||
|
||||
- name: Build JAR
|
||||
shell: bash
|
||||
run: |
|
||||
cd ATCS/packaging
|
||||
chmod +x package.sh
|
||||
./package.sh -windows
|
||||
|
||||
- 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
|
||||
|
||||
- name: Upload ZIP to Release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ github.event.release.upload_url }}
|
||||
asset_path: ./ATCS/packaging/ATCS_${{ env.VERSION }}.zip
|
||||
asset_name: ATCS_${{ env.VERSION }}.zip
|
||||
asset_content_type: application/zip
|
||||
|
||||
- name: Upload Installer to Release
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
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_name: ATCS_v${{ env.VERSION }}_Setup.exe
|
||||
asset_content_type: application/octet-stream
|
||||
Reference in New Issue
Block a user