chore(deps): migrate dependency management to poetry #39
This file contains hidden or 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: 🚚 Release | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| jobs: | |
| release: | |
| if: ${{ !contains(github.event.head_commit.message, '[skip release]') }} | |
| runs-on: ubuntu-latest | |
| concurrency: release | |
| permissions: | |
| checks: read | |
| statuses: read | |
| contents: write # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to be able to authenticate with PyPI using OIDC | |
| steps: | |
| - name: ⏰ Wait for builds to succeed | |
| uses: lewagon/wait-on-check-action@v1.4.0 | |
| with: | |
| ref: ${{ github.ref }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| wait-interval: 10 | |
| running-workflow-name: wait-for-check-regexp | |
| check-regexp: build-.* | |
| - name: 🛒 Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.SEMANTIC_PAT_TOKEN }} | |
| - name: 🐍 Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| architecture: 'x64' | |
| - name: 👷🏻 Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install poetry && poetry install | |
| - name: 👾 Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: 🐳 Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| platforms: ${{ vars.DOCKER_BUILD_PLATFORMS }} | |
| - name: 🪪 Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: 🚀 Publish release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.SEMANTIC_PAT_TOKEN }} | |
| PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
| run: poetry run semantic-release publish |