-
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (30 loc) · 885 Bytes
/
pypi.yaml
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
name: PyPI
on:
push:
branches:
- "**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
PUBLISH_TO_PYPI: true
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Python Version from File
id: python_version
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v4
with:
python-version: ${{ steps.python_version.outputs.version }}
- name: Install Dependencies
run: make install
- name: Build Wheel
run: make build
# This will only run on Tags
- name: Publish package
if: ${{ env.PUBLISH_TO_PYPI == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')}}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PUBLISH_API_KEY }}