tagging #57
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 Pyinstaller windows only | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- develop2 | |
jobs: | |
build: | |
name: Build windows only (${{ matrix.python-version }} | |
runs-on: windows-latest # Only run on Windows | |
strategy: | |
fail-fast: false # Don't cancel other jobs if one fails | |
matrix: | |
#os: [ubuntu-latest, windows-latest] | |
python-version: [ '3.11'] | |
solver: ["classic"] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Fetch tags | |
run: | | |
git fetch --tags | |
- name: Get the version tag | |
shell: bash -el {0} | |
id: vars | |
run: | | |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" | |
echo "Tag name from github.ref_name: ${{ github.ref_name }}" | |
- name: Set up Miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
auto-update-conda: true | |
activate-environment: QA | |
channels: swisstopo,conda-forge,defaults # defaults is included | |
channel-priority: flexible | |
environment-file: windows-3.11-environment.yaml | |
- name: Install packages in PowerShell Core | |
shell: pwsh | |
run: | | |
conda install conda-build anaconda-client conda-verify versioneer setuptools setuptools_scm jinja2 libffi pyyaml click geopandas gdal fiona pandas loguru shapely babel jsonschema openpyxl ruamel.yaml coverage -y | |
conda list | |
echo $env:CONDA_PREFIX | |
conda env export | |
- name: Get version from setuptools_scm | |
shell: bash -el {0} | |
id: get_version | |
run: echo "VERSION=$(python -c 'import setuptools_scm; print(setuptools_scm.get_version())')" >> $GITHUB_ENV | |
- name: Build pyinstaller package | |
shell: bash -el {0} | |
run: | | |
conda install pyinstaller -y | |
pip install -e ".[gui]" | |
pyinstaller gui/geocover-qa.spec --distpath dist/gui --workpath build/gui | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: geocover-qa-gui${{env.VERSION }}-${{ matrix.python-version }} | |
path: | | |
dist/gui/* | |