Skip to content

Commit

Permalink
chore(release): fix publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobCoffee authored Sep 25, 2023
1 parent f1d4a23 commit 3d849ff
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Latest Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
test_minimal_app:
name: Test Minimal Application with Base Dependencies
Expand All @@ -11,39 +14,51 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install App Dependencies
run: poetry install --no-interaction --only main

- name: Install Test Dependencies
run: poetry run python -m pip install pytest pytest-asyncio httpx trio time-machine

- name: Set pythonpath
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV

- name: Test
run: mv tests/examples/test_hello_world.py test_hello_world.py && poetry run pytest test_hello_world.py

publish-release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: poetry install --no-interaction --no-root --no-dev

- name: build
shell: bash
run: poetry build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 3d849ff

Please sign in to comment.