-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 957 Bytes
/
pypi.yaml
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
name: Push to PyPI
on:
release:
types: [released, prereleased]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7 - 3.10.7'
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2.2
- name: Install dependencies
run: |
poetry install --no-root
pip list
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Update Version
run: |
poetry version ${{ env.RELEASE_VERSION }}
- name: Build Library
run: |
poetry build
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.pypi_password_servicex }}
poetry publish