-
Notifications
You must be signed in to change notification settings - Fork 672
50 lines (43 loc) · 1.15 KB
/
pubPyPI.yml
File metadata and controls
50 lines (43 loc) · 1.15 KB
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
name: Upload Mplfinance to PyPI
permissions:
contents: read
on:
workflow_dispatch:
inputs:
tag:
description: 'version tag to deploy'
required: true
type: string
jobs:
build_and_deploy:
permissions:
id-token: write
attestations: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
persist-credentials: false
- name: Display Coded Version
#run: git show ${{ github.sha }}:src/mplfinance/_version.py
run: egrep 'version_info .*=' src/mplfinance/_version.py
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py sdist bdist_wheel
ls -l dist/*
- name: Publish distribution to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*