Clean up workflows #1344
This file contains hidden or 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: Windows | |
on: [push, pull_request] | |
permissions: read-all | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ".python-version" | |
- name: Install the project | |
run: uv sync --locked | |
- name: Run pre-commit hooks | |
run: | | |
uv tool install pre-commit | |
pre-commit run --all-files --verbose | |
- name: Run unit tests | |
run: uv run pytest -v | |
- name: Build | |
run: uv build | |
- name: Install from tar.gz | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
pip install dist/*.tar.gz | |
ykman --version | |
[[ -z "$(ykman --version | grep -E "not found|missing")" ]] | |
pip uninstall -y yubikey-manager | |
- name: Install from wheel | |
shell: bash | |
run: | | |
pip install dist/*.whl | |
ykman --version | |
[[ -z "$(ykman --version | grep -E "not found|missing")" ]] | |
pip uninstall -y yubikey-manager | |
- name: PyInstaller | |
shell: bash | |
run: | | |
uv run pyinstaller ykman.spec | |
dist/ykman/ykman.exe --version | |
[[ -z "$(dist/ykman/ykman.exe --version | grep -E "not found|missing")" ]] | |
- name: Copy scripts | |
shell: bash | |
run: cp -r resources/win dist/scripts | |
- name: Build installer | |
working-directory: ./dist | |
run: .\scripts\make_msi.ps1 | |
- name: Upload build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ykman-builds-windows | |
path: dist |