2023-12-29 18:10:26 +01:00
|
|
|
# Release a new TW Blue installer on github.
|
|
|
|
# This workflow runs on push.
|
|
|
|
name: Release
|
2023-12-29 19:01:14 +01:00
|
|
|
on:
|
|
|
|
push:
|
2023-12-30 16:40:19 +01:00
|
|
|
tags: ["release"]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-12-29 18:10:26 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
# Builds an x64 binary and an installer of TW Blue.
|
2023-12-30 16:40:19 +01:00
|
|
|
runs-on: windows-latest
|
2023-12-29 18:10:26 +01:00
|
|
|
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: Build binary
|
|
|
|
run: |
|
|
|
|
.\scripts\build.ps1
|
|
|
|
mv src/dist scripts\TWBlue64
|
|
|
|
|
|
|
|
- name: make installer
|
|
|
|
run: |
|
2023-12-30 16:40:19 +01:00
|
|
|
cd scripts
|
2023-12-29 18:10:26 +01:00
|
|
|
makensis twblue.nsi
|
|
|
|
|
|
|
|
- name: Create new release
|
|
|
|
env:
|
|
|
|
gh_token: ${{ github.token }}
|
2023-12-30 16:40:19 +01:00
|
|
|
run: |
|
|
|
|
mkdir .release-assets
|
|
|
|
mv scripts\TWBlue_setup.exe .release-assets\TWBlue_setup_$(cat version.txt).exe
|
|
|
|
7z a -tzip .release-assets\TWBlue_portable_$(cat version.txt).zip scripts\TWBlue64
|
2023-12-30 16:52:09 +01:00
|
|
|
gh release create release -n "New version of TWBlue." -t "Version $(cat version.txt)" .release-assets\TWBlue_setup_$(cat version.txt).exe .release-assets\TWBlue_portable_$(cat version.txt).zip
|