Make EvaP pip-installable and publish to PyPI #23
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: EvaP Release | |
on: | |
pull_request: | |
# release: | |
# types: [published] | |
jobs: | |
pypi-publish: | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: nix develop .#evap-dev --command bash -c <<EOF | |
set -ex | |
npm ci | |
./manage.py compilemessages | |
./manage.py scss --production | |
./manage.py ts compile --fresh | |
EOF | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: | | |
python3 -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade build | |
python -m build | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |