-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (31 loc) · 1.02 KB
/
pypi-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
name: Pypi Publishing
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+\.dev[0-9]+'
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install, build and publish project
env:
PCIC_PYPI_USERNAME: ${{ secrets.pcic_at_pypi_username }}
PCIC_PYPI_PASSWORD: ${{ secrets.pcic_at_pypi_password }}
run: |
# Configure Poetry to publish to PCIC private package repository
# Private repo name is "pcic". We could factor that out as an env var...
poetry config repositories.pcic https://pypi.pacificclimate.org/
poetry config http-basic.pcic $PCIC_PYPI_USERNAME $PCIC_PYPI_PASSWORD
# Install, build and publish
poetry install
poetry build
poetry publish -r pcic