-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (78 loc) · 2.43 KB
/
Copy pathrelease.yaml
File metadata and controls
89 lines (78 loc) · 2.43 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
82
83
84
85
86
87
88
89
name: release-please
on:
push:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: "Existing release tag to publish (e.g. v1.3.3)"
required: true
concurrency:
group: release-please
cancel-in-progress: true
permissions: {}
env:
UV_VERSION: "0.9.4"
jobs:
release-please:
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Run release-please
id: release
uses: googleapis/release-please-action@c3fc4de07084f75a2b61a5b933069bda6edf3d5c # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .release-please-config.json
manifest-file: .release-please-manifest.json
target-branch: main
build:
name: Build
permissions:
contents: read
needs: release-please
if: needs.release-please.outputs.release_created || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout release commit
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
ref: ${{ needs.release-please.outputs.release_tag || inputs.tag }}
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- name: Install uv
uses: astral-sh/setup-uv@b75dde52aef63a238519e7aecbbe79a4a52e4315 # v7
- name: Install dependencies
run: uv sync --all-groups
- name: Build package
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: python-package-distributions
path: dist/
publish-pypi:
permissions:
id-token: write
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/r2x-sienna
steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0