-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (43 loc) · 1.16 KB
/
publish.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
40
41
42
43
44
45
46
47
48
name: publish
on:
push:
tags:
- "hawc-client-[0-9]+.[0-9]+"
jobs:
publish-hawc-client:
runs-on: ubuntu-22.04
permissions:
id-token: write
environment:
name: publish
url: https://pypi.org/project/hawc-client/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- uses: actions/setup-python@v5
with:
python-version: '3.12'
architecture: 'x64'
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
cache-dependency-glob: "**/pyproject.toml"
- name: Install environment
run: |
uv pip install --system -e ".[dev,docs]"
uv pip install --system -e client
- name: Build client
run: cd client && poe build
- name: Publish package to PyPI
env:
PUBLISH_PYPI: ${{ secrets.PUBLISH_PYPI }}
if: env.PUBLISH_PYPI != null
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
attestations: true
print-hash: true
packages-dir: client/dist/