-
Notifications
You must be signed in to change notification settings - Fork 2
executable file
·66 lines (51 loc) · 1.65 KB
/
release.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Release
on:
push:
tags:
- v*
branches:
- release/*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install pypa/build
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install osp-core build
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
- name: Upload distribution artifact
uses: actions/upload-artifact@v3
with:
name: release
path: dist/
publish:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
name: Download distribution artifact
with:
name: release
path: dist/
- uses: softprops/[email protected]
name: Create release
if: startsWith(github.ref, 'refs/tags/v')
with:
files: |
dist/*
generate_release_notes: true
- name: Publish distribution on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags/v')
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}