Skip to content

TPVToggle - Version Bump and Release #7

TPVToggle - Version Bump and Release

TPVToggle - Version Bump and Release #7

name: Build and Release TPVToggle
permissions:
contents: write
on:
workflow_dispatch:
inputs:
version:
description: "Release version (without v prefix)"
required: true
default: "0.1.0"
type: string
prerelease:
description: "Is this a pre-release?"
required: false
default: false
type: boolean
changelog:
description: "Changelog entry for this version"
required: false
default: "- Initial release with basic third-person view toggle functionality"
type: string
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache MinGW
id: cache-mingw
uses: actions/cache@v3
with:
path: C:\ProgramData\chocolatey\lib\mingw
key: ${{ runner.os }}-mingw-8.1.0
- name: Install MinGW
if: steps.cache-mingw.outputs.cache-hit != 'true'
run: |
choco install mingw --version=8.1.0 -y
shell: powershell
- name: Set MinGW path
run: |
echo "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: powershell
- name: Create build directory
run: mkdir -p TPVToggle/build
shell: bash
- name: Build ASI plugin
run: |
cd TPVToggle
g++ -shared -o build/KCD2_TPVToggle.asi dllmain.cpp logger.cpp config.cpp toggle_thread.cpp aob_scanner.cpp exception_handler.cpp -static -lpsapi "-Wl,--add-stdcall-alias" -O2 -Wall -Wextra
shell: bash
- name: Display build output
run: |
dir TPVToggle\build
shell: cmd
- name: Create ZIP archive
run: |
cd TPVToggle\build
7z a ..\..\KCD2_TPVToggle_v${{ inputs.version }}.zip KCD2_TPVToggle.asi KCD2_TPVToggle.ini dinput8.dll README.txt THIRD-PARTY-LICENSES.txt
shell: powershell
- name: Create tag
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag -a TPVToggle-v${{ inputs.version }} -m "Release v${{ inputs.version }}"
git push origin TPVToggle-v${{ inputs.version }}
shell: bash
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: KCD2_TPVToggle_v${{ inputs.version }}.zip
name: KCD2 TPVToggle v${{ inputs.version }}
tag_name: TPVToggle-v${{ inputs.version }}
body: |
# Kingdom Come: Deliverance II - Third Person View Toggle
## Release v${{ inputs.version }}
This mod enables toggling between first-person and third-person views in Kingdom Come: Deliverance II using customizable hotkeys.
## Changelog
${{ inputs.changelog }}
### Installation
1. Simply extract all files to your game directory:
`<KC:D 2 installation folder>/Bin/Win64MasterMasterSteamPGO/`
2. Launch the game and press F3 (default) to toggle the camera view
### Note
This package includes everything you need:
- KCD2_TPVToggle.asi (the mod itself)
- KCD2_TPVToggle.ini (configuration file)
- dinput8.dll (Ultimate ASI Loader)
- Documentation and license information
### Configuration
Edit the `KCD2_TPVToggle.ini` file to customize hotkeys and other settings.
See the [README](https://github.com/tkhquang/KDC2Tools/blob/main/TPVToggle/README.md) for detailed instructions.
draft: false
prerelease: ${{ inputs.prerelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}