-
-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (55 loc) · 1.59 KB
/
release-pypi-build-push-package.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Release | PyPi Build Package and Push
on:
release:
types: [published]
jobs:
build_push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Poetry
run: |
echo "[INFO] Installing Poetry..."
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.2 python -
echo "[INFO] Configuring Poetry..."
poetry config virtualenvs.create false # This prevents poetry from creating a virtual environment
- name: Install dependencies using Poetry
run: |
echo "[INFO] Installing dependencies..."
export ENV POETRY_VIRTUALENVS_CREATE=false
export PATH="${PATH}:${HOME}/.poetry/bin"
poetry install --with=dev
- name: bump_version
run: |
make bump-version-ci
- name: clean
run: |
make clean
- name: build
run: |
make build
- name: check
run:
make check
- name: upload
run: |
make push-ci
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
- name: commit_push
run: |
git push
- uses: act10ns/slack@v1
if: always()
with:
status: ${{ job.status }}
channel: $SLACK_CI_CHANNEL
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_CI_CHANNEL: ${{ secrets.SLACK_CI_CHANNEL }}