Skip to content

Saving and restoring environment variables that tend to get clobbered… #15

Saving and restoring environment variables that tend to get clobbered…

Saving and restoring environment variables that tend to get clobbered… #15

Workflow file for this run

name: Test and Publish
on:
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
name: Python ${{ matrix.python-version }} testing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: |
python -m tox
publish:
needs: test
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build with poetry
run: |
poetry version `python scripts/generate_version.py`
poetry build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1