2023-12-29 11:10:26 -06:00
|
|
|
# Release a new TW Blue installer on github.
|
|
|
|
# This workflow runs on push.
|
|
|
|
name: Release
|
2023-12-29 12:01:14 -06:00
|
|
|
on:
|
|
|
|
push:
|
2023-12-31 00:05:07 -06:00
|
|
|
tags:
|
|
|
|
- v20*
|
2023-12-30 09:40:19 -06:00
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-12-29 11:10:26 -06:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
# Builds an x64 binary and an installer of TW Blue.
|
2023-12-30 09:40:19 -06:00
|
|
|
runs-on: windows-latest
|
2023-12-29 11:10:26 -06: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 09:40:19 -06:00
|
|
|
cd scripts
|
2023-12-29 11:10:26 -06:00
|
|
|
makensis twblue.nsi
|
|
|
|
|
2024-01-05 17:28:17 -06:00
|
|
|
- name: Create portable
|
|
|
|
working-directory: scripts\TWBlue64
|
|
|
|
run: |
|
|
|
|
7z a -tzip TWBlue_portable.zip .
|
|
|
|
|
2023-12-29 11:10:26 -06:00
|
|
|
- name: Create new release
|
|
|
|
env:
|
|
|
|
gh_token: ${{ github.token }}
|
2023-12-30 09:40:19 -06:00
|
|
|
run: |
|
|
|
|
mkdir .release-assets
|
2023-12-31 00:34:05 -06:00
|
|
|
mv scripts\TWBlue_setup.exe .release-assets\TWBlue_setup_${{github.ref_name}}.exe
|
2024-01-05 17:28:17 -06:00
|
|
|
mv scripts\TWBlue64\TWBlue_portable.zip .release-assets\TWBlue_portable_${{github.ref_name}}.zip
|
2024-05-18 18:41:33 -06:00
|
|
|
gh release create "${{github.ref_name}}" -F "release-notes.md" -t "${{github.ref_name}}" .release-assets\TWBlue_setup_${{github.ref_name}}.exe .release-assets\TWBlue_portable_${{github.ref_name}}.zip
|