-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.49 KB
/
Copy pathdeploy.yml
File metadata and controls
48 lines (40 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy Package via Poetry
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Python with Poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Use the appropriate Python version for your project
# Install Poetry
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$(poetry --version)" # Verify Poetry installation
# Install dependencies from the correct poetry.lock
- name: Install dependencies
run: |
cd accelapy/accelapy # Navigate to the folder containing poetry.lock
poetry install --no-root # Install dependencies from poetry.lock (without installing the package itself)
# Build the package
- name: Build the package
run: |
cd accelapy/accelapy # Navigate to the folder containing the poetry.toml
poetry build # Build the package (source distribution and wheel)
# Deploy the package (for example, to PyPI)
- name: Deploy to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} # Set your PyPI username as a secret
run: |
cd accelapy/accelapy # Navigate to the folder containing poetry.toml
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish