Skip to content

Commit

Permalink
ci: add ci and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
gmargaritis committed Feb 5, 2024
1 parent 18a302d commit e236b56
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on: push

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: pipx install poetry==1.7.1
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- run: poetry check
- run: poetry lock --check
- run: poetry install
- run: poetry run black --check .
- run: poetry run isort --check .
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish to PyPI

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- run: pipx install poetry==1.7.1
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- run: poetry check
- run: poetry install
- name: Build and publish
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/withlogicco/poetry:1.6.1-python-3.11
FROM ghcr.io/withlogicco/poetry:1.7.1-python-3.12

WORKDIR /usr/src/app
COPY pyproject.toml poetry.lock ./
Expand Down

0 comments on commit e236b56

Please sign in to comment.