-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 976 Bytes
/
publish.yml
File metadata and controls
47 lines (39 loc) · 976 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
45
46
name: Publish
on:
workflow_run:
workflows:
- GitHub Release
types:
- completed
branches:
- main
concurrency:
group: publish-${{ github.event.workflow_run.head_sha }}
cancel-in-progress: true
jobs:
publish:
name: Publish to PyPI
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment:
name: pypi
url: https://pypi.org/project/django-returns/
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Build sdist and wheel
run: uv build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true