-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.1 KB
/
publish.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
39
40
41
42
43
44
45
46
47
48
49
50
51
name: publish
on:
release:
types: [published]
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-publish
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: ./.github/actions/setup-python
- name: build
run: uvx --from build pyproject-build --installer uv
working-directory: bored-charts
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: bored-charts/dist
publish:
if: github.event_name == 'release'
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/bored-charts
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheels-sdist/