Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 0 additions & 89 deletions .github/workflows/python-poetry-pypi-with-data.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/release-ekors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ jobs:

release:
name: Release
environment:
name: pypi
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.event.inputs.tag != ''
needs: [linux, windows, macos, sdist]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-pyapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ jobs:

release:
name: Release
environment:
name: pypi
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.event.inputs.tag != ''
needs: [linux, windows, macos, sdist]
Expand Down
65 changes: 60 additions & 5 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,64 @@ permissions:

jobs:
publish:
name: 📦 PyPI (🐍 ${{ vars.PYTHON_VERSION_WORKFLOWS }})
environment:
name: pypi
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') || github.event.inputs.tag != ''
uses: ./.github/workflows/python-poetry-pypi-with-data.yml
with:
poetry-extras: "-E mark -E box"
data-version: "v2"
data-download: "./tests/data/assets.sh"

steps:
- uses: actions/checkout@v4
with:
# tags needed for dynamic versioning
fetch-depth: 0
- name: Set up Python ${{ vars.PYTHON_VERSION_WORKFLOWS }} 🐍
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ vars.PYTHON_VERSION_WORKFLOWS }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-path: ~/.virtualenvs
installer-parallel: true
- name: Cache Poetry virtualenv
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
key: ${{ runner.os }}-py-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install version management tool
run: |
# same poetry env
PIP="$(head -n1 $(which poetry) | cut -c 3-) -m pip"
${PIP} install poetry-dynamic-versioning
- name: Install dependencies
run: poetry install --no-interaction --no-root --with test -E mark -E box
if: steps.cache.outputs.cache-hit != 'true'
- name: Install project
# it is required to repeat extras, otherwise they will be removed from
# the environment
run: poetry install --no-interaction -E mark -E box
- name: Install task runner
run: pip install poethepoet
- name: Get test data
id: cache-test-data
uses: actions/cache@v4
with:
path: test-data
key: test-data-v2
- name: Download test data
if: steps.cache-test-data.outputs.cache-hit != 'true'
run: |
./tests/data/assets.sh
- name: Test
run: |
# run tests just before deployment
poe test
- name: Package the distribution
run: |
# package the pure python wheel
poetry build
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading