-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (36 loc) · 1.23 KB
/
deploy.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
name: Publish to PyPI
on:
release:
types: [created]
concurrency:
group: ${{ github.workflow }}
jobs:
deploy:
name: Upload release to TestPyPI and PyPi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mailtm-python
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -U build
- name: Build and package
run: python3 -m build --sdist --wheel --outdir dist/ .
- name: Publish 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}