Skip to content

Commit

Permalink
chore: prepare to publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangeok committed Nov 19, 2024
1 parent 306c61d commit b47f49c
Show file tree
Hide file tree
Showing 4 changed files with 495 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish

on:
push:
tags:
- '**'

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install latest Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Install dependencies (including dev)
run: |
poetry install --with dev
- name: Build package
run: poetry build

- name: Publish package to PyPI
run: |
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
__pycache__
.testmondata*
.coverage
.pytest_cache
dist
Loading

0 comments on commit b47f49c

Please sign in to comment.