Appify #198
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 | |
on: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Check linting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install pre-commit | |
run: python -m pip install pre-commit | |
- name: Run pre-commit | |
run: pre-commit run --all-files | |
build: | |
name: Build packages | |
runs-on: ${{ matrix.os }} | |
needs: lint | |
strategy: | |
matrix: | |
include: | |
- os: macos-latest | |
TARGET: macos | |
CMD_BUILD: > | |
pyinstaller snowcli.spec && | |
cd ./dist/snow && | |
zip -g ../../snow.zip -r . | |
ARTIFACT_NAME: snow-${{ github.sha }}-darwin | |
PATH: snow.zip | |
- os: windows-latest | |
TARGET: windows | |
CMD_BUILD: pyinstaller snowcli.spec | |
ARTIFACT_NAME: snow-${{ github.sha }}-windows | |
PATH: ./dist/snow/ | |
- os: ubuntu-latest | |
TARGET: linux | |
CMD_BUILD: > | |
pyinstaller snowcli.spec && | |
cd ./dist/snow && | |
zip -g ../../snow.zip -r . | |
ARTIFACT_NAME: snow-${{ github.sha }}-linux | |
PATH: snow.zip | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip check | |
snow --help | |
pip install -U pyinstaller | |
- name: Build with pyinstaller for ${{matrix.TARGET}} | |
run: ${{matrix.CMD_BUILD}} | |
- name: Archive python artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.ARTIFACT_NAME}} | |
path: ${{matrix.PATH}} | |
retention-days: 7 | |
dev-build: | |
name: Do dev installation | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e ".[dev]" | |
pip check | |
snow --help |