Maintenance: update dependencies #18
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: wxPython Build | |
on: | |
push: | |
branches: | |
- debug* | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
- v[0-9]+.[0-9]+.[0-9]+-* | |
jobs: | |
build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
env: | |
PYTHON: "3.11" | |
steps: | |
- name: Define Release Type | |
id: release_type | |
run: | | |
REF="${GITHUB_REF##*/}" | |
if [[ $REF =~ "v"([0-9]\.)+[0-9]"-beta" ]]; then | |
echo "RELEASE_TYPE=beta" >> $GITHUB_OUTPUT | |
elif [[ $REF =~ "v"([0-9]\.)+[0-9]$ ]]; then | |
echo "RELEASE_TYPE=release" >> $GITHUB_OUTPUT | |
elif [[ $REF =~ "debug"("-".*)? ]]; then | |
echo "RELEASE_TYPE=debug" >> $GITHUB_OUTPUT | |
fi | |
echo "VERSION=$REF" >> $GITHUB_OUTPUT | |
echo $REF | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON }} | |
- name: Bootstrap Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - -y | |
- name: Update Path for windows | |
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH | |
- name: Enable long paths for git on Windows | |
run: git config --system core.longpaths true | |
- name: Configure poetry | |
run: poetry config virtualenvs.in-project true | |
- name: Setup cache | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: .venv | |
key: venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Check lock file | |
run: poetry check --lock | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Build | |
run: | | |
poetry run python setup.py build | |
- name: Packaging | |
run: | | |
cd build/exe.win-amd64-3.11 | |
cp ../../LICENSE . | |
7z a ../../pyCeStoriesViewer-win64-${GITHUB_REF##*/}.7z . | |
- name: Release (debug) | |
if: ${{ steps.release_type.outputs.RELEASE_TYPE == 'debug' }} | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: pyCeStoriesViewer-win64-${{ steps.release_type.outputs.VERSION }}.7z | |
prerelease: True | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.release_type.outputs.VERSION }}-${{ github.run_number }} | |
body: | | |
This is a debug build to help with development. | |
- name: Release (beta) | |
if: ${{ steps.release_type.outputs.RELEASE_TYPE == 'beta' }} | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: pyCeStoriesViewer-win64-${{ steps.release_type.outputs.VERSION }}.7z | |
prerelease: True | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release (stable) | |
if: ${{ steps.release_type.outputs.RELEASE_TYPE == 'release' }} | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: pyCeStoriesViewer-win64-${{ steps.release_type.outputs.VERSION }}.7z | |
token: ${{ secrets.GITHUB_TOKEN }} |