-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (72 loc) · 2.16 KB
/
Copy pathdeploy.yaml
File metadata and controls
81 lines (72 loc) · 2.16 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
name: Deploy
on:
push:
branches:
- main
- renovate/**
tags:
- v*
pull_request:
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-slim
steps:
- name: Checkout source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
activate-environment: true
enable-cache: false
python-version: 3.14
- name: Install dependencies
shell: bash
run: uv sync --only-dev
- name: Build distributions
shell: bash
run: uv run python -m build
- name: Upload distribution
# yamllint disable-line rule:line-length
uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2
deploy-test-pypi:
if: startsWith(github.ref, 'refs/tags/')
needs: build
permissions:
id-token: write
runs-on: ubuntu-slim
steps:
- name: Download distributions
# yamllint disable-line rule:line-length
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: Packages
path: dist
- name: Publish package to TestPyPI
# yamllint disable-line rule:line-length
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
deploy-pypi:
if: startsWith(github.ref, 'refs/tags/')
needs: build
permissions:
id-token: write
runs-on: ubuntu-slim
steps:
- name: Download distributions
# yamllint disable-line rule:line-length
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: Packages
path: dist
- name: Publish package to PyPI
# yamllint disable-line rule:line-length
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
verbose: true