Generate Requirements Files #5
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: Generate Requirements Files | |
on: | |
workflow_dispatch: | |
jobs: | |
generate-requirements: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
python-version: ["3.9"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pip-tools | |
run: pip install pip-tools | |
- name: Generate requirements file | |
run: pip-compile --extra web --output-file requirements-${{ matrix.os }}-${{ matrix.python-version }}.txt pyproject.toml | |
upload-artifacts: | |
needs: generate-requirements | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload requirements files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: requirements | |
path: requirements-*.txt |