initial commit #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: >- | |
base-devel | |
mingw-w64-ucrt-x86_64-toolchain | |
mingw-w64-ucrt-x86_64-cmake | |
mingw-w64-ucrt-x86_64-curl | |
mingw-w64-ucrt-x86_64-openvr | |
zip | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
cmake --build . | |
- name: Package | |
run: | | |
cd build | |
cp ../openvr_battery_monitor.conf . | |
cp /ucrt64/bin/libcurl-4.dll . | |
cp /ucrt64/bin/libopenvr_api.dll . | |
zip openvr_battery_monitor.zip libcurl-4.dll libopenvr_api.dll openvr_battery_monitor.exe openvr_battery_monitor.conf | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/openvr_battery_monitor.zip | |
draft: false | |
prerelease: false |