-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (35 loc) · 945 Bytes
/
release.yml
File metadata and controls
43 lines (35 loc) · 945 Bytes
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: Release Project
on:
push:
branches:
- main
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9.6'
- name: Install requirements
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build
- name: Build Project
run: python3 -m build --sdist --wheel --outdir dist/
- name: Release to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Release to GitHub
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.whl
dist/*.tar.gz