-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (34 loc) · 881 Bytes
/
Copy pathpublish.yml
File metadata and controls
44 lines (34 loc) · 881 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
42
43
44
name: Publish
permissions:
contents: write
on:
push:
tags:
- 'v**'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- name: Install dependencies (including dev)
run: pdm sync --dev
- name: Lint
run: pdm run lint
- name: Run tests
run: pdm run test
- name: Publish to PyPI
env:
PDM_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: pdm publish -u __token__
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --generate-notes;