Publish Python package to Packagr #28
Workflow file for this run
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: 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 |