-
Notifications
You must be signed in to change notification settings - Fork 29
41 lines (35 loc) · 904 Bytes
/
release.yml
File metadata and controls
41 lines (35 loc) · 904 Bytes
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: Release
on:
# Support manually pushing a new release
workflow_dispatch: {}
# Trigger when a release or pre-release is published
release:
types: [published]
defaults:
run:
shell: bash
jobs:
test:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: "pip"
cache-dependency-path: setup.py
- name: Install dependencies
run: |
pip install -e .[dev]
- name: Test
run: |
python -m pytest
- name: Publish
env:
TWINE_NON_INTERACTIVE: true
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/* --skip-existing