-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1021 Bytes
/
deploy.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
41
42
43
name: "Build & deploy"
on:
release:
types: [released]
concurrency: build-deploy
jobs:
build:
name: Build & deploy to PyPi
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.workflow_run.head_sha }}
lfs: true
- name: Get release version
id: release_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: ./scripts/deps.sh
- name: Build code as a Python package
run: python3 setup.py sdist
env:
VERSION: ${{ steps.release_version.outputs.VERSION }}
- name: Deploy to PyPi
run: twine upload dist/* --verbose
env:
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}