mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 11:18:08 -06:00
Created release.yml - action file for automated release on push.
This commit is contained in:
parent
701c509cf4
commit
7d66fa0695
45
.github/workflows/release.yml
vendored
Normal file
45
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
# Release a new TW Blue installer on github.
|
||||
# This workflow runs on push.
|
||||
name: Release
|
||||
on: [push, workflow_dispatch]
|
||||
jobs:
|
||||
build:
|
||||
# Builds an x64 binary and an installer of TW Blue.
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- name: clone repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: Get python interpreter
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install python packages
|
||||
run: python -m pip install -r requirements.txt
|
||||
|
||||
- name: Get nsis
|
||||
run: |
|
||||
iwr -useb get.scoop.sh -outfile 'install.ps1'
|
||||
.\install.ps1 -RunAsAdmin
|
||||
scoop update
|
||||
scoop bucket add extras
|
||||
scoop install nsis
|
||||
|
||||
- name: Build binary
|
||||
run: |
|
||||
.\scripts\build.ps1
|
||||
mv src/dist scripts\TWBlue64
|
||||
|
||||
- name: make installer
|
||||
run: |
|
||||
cd src
|
||||
python write_version_data.py
|
||||
cd ../scripts
|
||||
makensis twblue.nsi
|
||||
|
||||
- name: Create new release
|
||||
env:
|
||||
gh_token: ${{ github.token }}
|
||||
run: gh release create snapshot -n "This release is a snapshot of the current development version of twblue." -p -t "Snapshot" scripts\TWBlue_setup.exe
|
15
scripts/build.ps1
Normal file
15
scripts/build.ps1
Normal file
@ -0,0 +1,15 @@
|
||||
# Build a TW Blue installer.
|
||||
# Must be called from root of repo
|
||||
echo "Generating documentation..."
|
||||
cd doc
|
||||
python documentation_importer.py
|
||||
python generator.py
|
||||
mv documentation ..\src
|
||||
cd ..
|
||||
echo "done."
|
||||
|
||||
echo "Building binary..."
|
||||
cd src
|
||||
python setup.py build
|
||||
cd ..
|
||||
echo "done."
|
@ -58,7 +58,8 @@ SetOutPath "$INSTDIR"
|
||||
${If} ${RunningX64}
|
||||
File /r TWBlue64\*
|
||||
${Else}
|
||||
File /r TWBlue\*
|
||||
messagebox MB_ICONSTOP "Error: This TWBlue installer is only compatible with 64-bit systems. TWBlue does not support 32 bit systems any more."
|
||||
Quit
|
||||
${EndIf}
|
||||
CreateShortCut "$DESKTOP\TWBlue.lnk" "$INSTDIR\TWBlue.exe"
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
|
||||
|
Loading…
Reference in New Issue
Block a user