This repository was archived by the owner on Nov 20, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (58 loc) · 1.7 KB
/
upload_to_pypi.yml
File metadata and controls
59 lines (58 loc) · 1.7 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
51
52
53
54
55
56
57
58
59
name: Upload to PyPi on Release
on:
release:
types: [created]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
upload-pypi-on-release:
name: Upload to PyPi on release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10.14
uses: actions/setup-python@v1
with:
python-version: 3.10.14
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Install pytest
run: |
python -m pip install pytest
python -m pip install -r requirements.txt
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Install Build for Testing
run: |
python -m pip install dist/dash-tools-*.tar.gz
- name: Test with Pytest
run: |
python -m pytest
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Send mail
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: Github Actions job result
to: andrew_hossack@outlook.com
from: GitHub Actions
secure: true
body: PyPi deploy job of ${{github.repository}} completed successfully!
ignore_cert: true
priority: normal