-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.03 KB
/
publish.yml
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
name: Publish Package
on:
workflow_run:
workflows: ["Check formatting and run tests"]
types:
- completed
jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 - # Install Poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH # Add Poetry to the PATH
- name: Install dependencies
run: poetry install --no-interaction --no-ansi
- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
MY_TEST: ${{ secrets.TEST }}
run: |
echo $MY_TEST
poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI
echo "Added token"
poetry build
echo "Successfully built"
poetry publish --build -vv