-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (38 loc) · 1.03 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
name: deploy
on:
push:
branches: [main, rc]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
jobs:
deploy-pypi:
runs-on: ubuntu-latest
# GitHub environment
environment:
name: release
url: https://pypi.org/project/spinspg/
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools_scm wheel
python setup.py sdist bdist_wheel
# Github Actions are added as Trusted Publisher for PyPI
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true