-
Notifications
You must be signed in to change notification settings - Fork 10
41 lines (33 loc) · 992 Bytes
/
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
name: Package and Release
# Build Python package for PyPi and GitGub release, and then publish a GitHub Release
# Runs on semantic versioned tags only
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
name: Build, Upload, and Release
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install Flit
run: |
python -m pip install --upgrade pip
pip install flit
- name: Build Python Package and Upload to PyPi
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_TOKEN }}
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
run: |
flit install --symlink --deps production
flit publish
- name: Create GitHub Release with Python Package
uses: softprops/action-gh-release@v1
with:
files: dist/*