Skip to content

Merge pull request #101 from smkent/manage-cookie #8

Merge pull request #101 from smkent/manage-cookie

Merge pull request #101 from smkent/manage-cookie #8

Workflow file for this run

---
name: Release
env:
ENABLE_PYPI_PUBLISH: true
ENABLE_TEST_PYPI_PUBLISH: true
RELEASE_PYTHON_VERSION: "3.12"
RELEASE_POETRY_VERSION: "1.6"
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
Publish:
name: Publish package for ${{ github.ref_name }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- name: πŸ’Ύ Check out repository
uses: actions/checkout@v3
- name: πŸ“œ Fetch full repository history for unit tests
run: git fetch --unshallow
- name: 🐍 Set up Python project with Poetry
uses: ./.github/workflows/actions/python-poetry
with:
python_version: ${{ env.RELEASE_PYTHON_VERSION }}
poetry_version: ${{ env.RELEASE_POETRY_VERSION }}
- name: πŸ”₯ Test
run: poetry run poe test
- name: πŸš’ Create test summary
uses: test-summary/action@v1
if: success() || failure()
with:
paths: ./.pytest_results.xml
- name: πŸ“¦ Build package
if: |
env.ENABLE_PYPI_PUBLISH == 'true'
|| env.ENABLE_TEST_PYPI_PUBLISH == 'true'
run: poetry build
- name: πŸ”Ό Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ env.ENABLE_TEST_PYPI_PUBLISH == 'true' }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: ☒️ Publish to PyPI
if: ${{ env.ENABLE_PYPI_PUBLISH == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false