Skip to content

Commit

Permalink
ci: add action for publishing the package (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurdjn authored Jan 27, 2025
1 parent a65c8cf commit a202457
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and publish python package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

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

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

- name: Setup python environment
run: |
sudo apt install pipx
pipx ensurepath
pipx install poetry
- name: Install package
run: poetry install --without dev

- name: Build package
run: poetry build

- name: Publish package
run: |
poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
poetry publish
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Added

- Added CI/CD pipeline for pre-commit, tests. Run tests and linter on PRs.
- Added CI/CD pipeline for pre-commit, tests, publishing to PyPI. Run tests and linter on PRs.

#### Changed

Expand Down

0 comments on commit a202457

Please sign in to comment.