ci: 💚 publish to pypi in seperate step

This commit is contained in:
Nate Sesti 2023-10-11 18:35:03 -07:00
parent cfffea970b
commit 2598e8d139

View file

@ -6,6 +6,48 @@ on:
- preview
jobs:
pypi-deployment:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install project dependencies
run: cd server && poetry install
- name: Configure Poetry Token
run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Bump the version
run: cd server && poetry version patch
- name: Build and publish the package
run: cd server && poetry publish --build
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am "ci: 🏷 Update PyPI version [skip ci]"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
build:
strategy:
matrix:
@ -73,17 +115,6 @@ jobs:
- name: Build PyInstaller Executable
run: pyinstaller continue_server.spec
# 1.25 Publish to PyPI
- name: Configure Poetry Token
run: cd server && poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- name: Bump the version
run: cd server && poetry version patch
- name: Build and publish the package
run: cd server && poetry publish --build
# 1.5 Place the binary in extension/exe directory
- name: Make sure extension/exe directory exists
run: |