Skip to content

Publish Python package to Packagr #28

Publish Python package to Packagr

Publish Python package to Packagr #28

Workflow file for this run

name: Publish Python package to Packagr
on:
release:
types: [created, edited]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: pip install nox poetry
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Run tests with Nox
run: nox -s lint tests_github --verbose
- name: Publish package
run: |
poetry config repositories.packagr ${{ secrets.PACKAGR_REPOSITORY_URL }}
poetry config http-basic.packagr ${{ secrets.PACKAGR_USERNAME }} ${{ secrets.PACKAGR_PASSWORD }}
poetry publish --build --repository packagr