Skip to content

Commit

Permalink
updated release action
Browse files Browse the repository at this point in the history
  • Loading branch information
simjak committed Nov 9, 2023
1 parent 7fa3cf6 commit 49f9ea9
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,35 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Build
run: poetry build

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Publish to PyPI
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
poetry config repositories.remote https://upload.pypi.org/legacy/
poetry --no-interaction -v publish --build --repository remote --username "__token__" --password "$PYPI_API_TOKEN"
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

release:
needs: build
needs: publish
runs-on: ubuntu-latest
steps:
- name: Create Release
Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from setuptools import setup, find_packages

setup(
name="semantic_router",
version="0.0.1",
packages=find_packages(),
)

0 comments on commit 49f9ea9

Please sign in to comment.