changes to workflow

This commit is contained in:
Rajat Sen
2025-10-07 21:38:22 +00:00
parent dc35e580d9
commit 018b2557ab
6 changed files with 171 additions and 39 deletions
+10 -14
View File
@@ -1,4 +1,4 @@
name: Poetry publish
name: Python package build
on:
push:
@@ -7,24 +7,20 @@ on:
branches: [ "master" ]
jobs:
buildPush:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install Poetry
python-version: '3.11'
- name: Install uv
run: |
python -m pip install --upgrade pip
pip install poetry
# use the hardcoded version number for now. if this is merged to the main repo, you can uncomment these lines to automatically tag the version number with the github run number
# e.g. poetry version 0.1.${{ github.run_number }}
- name: Set Version number
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install build dependencies
run: |
poetry version 1.3.0
- name: Build and Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish --build
uv pip install build
- name: Build package
run: python -m build
+25
View File
@@ -0,0 +1,25 @@
name: Manual PyPI Publish
on:
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install Poetry
run: |
uv pip install poetry
- name: Build and Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
poetry publish --build