-
Notifications
You must be signed in to change notification settings - Fork 22
39 lines (35 loc) · 1 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
name: Upload Python Package
on:
push:
tags:
- v*.*.*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install -U pip
pip install -U .[packaging]
- name: Construct release body
id: construct
run: |
awk -v RS='' '/\[v/ {print $0; exit}' Changelog.md | tail -n+2 > ${{ github.workspace }}-release_notes.md
cat ${{ github.workspace }}-release_notes.md
- name: Create Github release
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}-release_notes.md
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build package and publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine upload dist/*