Skip to content

Commit

Permalink
add workflow to publish backend to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
glass-ships committed Jul 6, 2023
1 parent 73aa7df commit d7492f3
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: publish on pypi

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install poetry && poetry install
- name: Build
run: |
poetry build
- name: Publish to PyPi
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config http-basic.pypi "__token__" "${PYPI_API_TOKEN}"
poetry publish

0 comments on commit d7492f3

Please sign in to comment.