ci: 💚 publish to pypi in ci

This commit is contained in:
Nate Sesti 2023-09-06 14:40:42 -07:00
parent 1f95bb2878
commit b6769e343a
2 changed files with 47 additions and 0 deletions

View file

@ -6,6 +6,31 @@ on:
- main
jobs:
pypi-deployment:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install project dependencies
run: cd continuedev && poetry install
- name: Configure Poetry Token
run: cd continuedev && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Build and publish the package
run: cd continuedev && poetry publish --build
pyinstaller:
strategy:
matrix:

22
build.sh Normal file
View file

@ -0,0 +1,22 @@
#!/bin/sh
# 1. Remove unwanted stuff
rm -rf build
rm -rf env
rm -rf dist
rm -rf continuedev/.venv
# 2. Create a new virtual environment and activate it
python3 -m venv env
source env/bin/activate
# 3. Install the required packages
pip install -r continuedev/requirements.txt
pip install pyinstaller
# 4. Call PyInstaller from within the virtual environment
env/bin/pyinstaller run.spec
# 5. Deactivate the virtual environment
deactivate