Fix failure detecting result of new replays #45
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
on: | |
push: | |
tags: | |
- "v*" # A version tag = a release | |
jobs: | |
build: | |
runs-on: "windows-latest" | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
cache: pip | |
- name: Cache pyinstaller build directory | |
uses: actions/cache@v3 | |
with: | |
path: ./build | |
key: pyinstaller-build | |
- name: Install shroudstone & pyinstaller | |
run: pip install pyinstaller -e .[test] | |
- name: Run tests | |
run: python -m pytest | |
- name: Build shroudstone.exe | |
run: ./pyinstaller_build.bat | |
- name: Test .exe | |
run: ./dist/shroudstone.exe --help | |
- name: Determine release type | |
shell: bash | |
id: check-tag | |
run: | | |
if [[ ${{ github.ref }} =~ [0-9](a|b|rc)[0-9]+$ ]]; then | |
echo "prerelease=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
files: dist/shroudstone.exe | |
prerelease: ${{ steps.check-tag.outputs.prerelease == 'true' }} |