-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1 KB
/
pypi.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: PyPI
on:
push:
tags:
- '*'
jobs:
build_and_deploy:
runs-on: ubuntu-latest
if: github.repository == 'eriknw/innerscope'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build wheel and sdist
run: python -m build --sdist --wheel
- uses: actions/upload-artifact@v4
with:
name: releases
path: dist
if-no-files-found: error
- name: Check with twine
run: python -m twine check --strict dist/*
- name: Publish to PyPI
if: contains(github.ref, 'refs/tags/')
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}