http-api-tool 1.0.2__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/dependabot.yml +2 -0
- http_api_tool-1.0.4/.github/workflows/build-test-release.yaml +388 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/build-test.yaml +145 -286
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/codeql.yml +1 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/openssf-scorecard.yaml +1 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/release-drafter.yaml +1 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/security-scans.yaml +2 -2
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/semantic-pull-request.yaml +1 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/workflows/verify-gha-versions.yaml +1 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.pre-commit-config.yaml +6 -6
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/CHANGELOG-v0.2.0.md +18 -14
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/PKG-INFO +77 -87
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/README.md +74 -85
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/UV-QUICK-REFERENCE.md +34 -42
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/action.yaml +27 -27
- http_api_tool-1.0.2/Dockerfile → http_api_tool-1.0.4/docker/Containerfile +12 -7
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/pyproject.toml +6 -1
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/src/http_api_tool/_version.py +2 -2
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/src/http_api_tool/cli.py +2 -2
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/uv.lock +46 -0
- http_api_tool-1.0.2/.github/workflows/build-test-release.yaml +0 -587
- http_api_tool-1.0.2/.github/workflows/dependencies.yaml +0 -54
- http_api_tool-1.0.2/.github/workflows/documentation.yaml +0 -109
- http_api_tool-1.0.2/Makefile +0 -144
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.actrc +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.codespell +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.dockerignore +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.editorconfig +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/cache-config.yaml +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.github/release-drafter.yml +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.gitignore +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.gitlint +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.readthedocs.yml +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/.yamllint +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/LICENSE +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/LICENSES/Apache-2.0.txt +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/REUSE.toml +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/scripts/check-pip-security.py +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/scripts/generate_requirements.py +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/sonar-project.properties +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/src/http_api_tool/__init__.py +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/src/http_api_tool/__main__.py +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/src/http_api_tool/verifier.py +0 -0
- {http_api_tool-1.0.2 → http_api_tool-1.0.4}/tests/test_http_api_tool.py +0 -0
|
@@ -8,11 +8,13 @@ updates:
|
|
|
8
8
|
directory: "/"
|
|
9
9
|
schedule:
|
|
10
10
|
interval: "weekly"
|
|
11
|
+
open-pull-requests-limit: 15
|
|
11
12
|
commit-message:
|
|
12
13
|
prefix: "Chore"
|
|
13
14
|
- package-ecosystem: "pip"
|
|
14
15
|
directory: "/"
|
|
15
16
|
schedule:
|
|
16
17
|
interval: "weekly"
|
|
18
|
+
open-pull-requests-limit: 10
|
|
17
19
|
commit-message:
|
|
18
20
|
prefix: "Chore"
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
---
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
# SPDX-FileCopyrightText: 2025 The Linux Foundation
|
|
4
|
+
|
|
5
|
+
# Runs on a new pull request, performs build and runs tests
|
|
6
|
+
name: 'Python Build/Test/Release'
|
|
7
|
+
|
|
8
|
+
# yamllint disable-line rule:truthy
|
|
9
|
+
on:
|
|
10
|
+
# Trigger on tag push events
|
|
11
|
+
push:
|
|
12
|
+
tags:
|
|
13
|
+
- '**'
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
concurrency:
|
|
18
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
19
|
+
cancel-in-progress: true
|
|
20
|
+
|
|
21
|
+
env:
|
|
22
|
+
REGISTRY: ghcr.io
|
|
23
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
24
|
+
|
|
25
|
+
jobs:
|
|
26
|
+
tag-validate:
|
|
27
|
+
name: 'Validate Tag Push'
|
|
28
|
+
runs-on: 'ubuntu-latest'
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
timeout-minutes: 1
|
|
32
|
+
outputs:
|
|
33
|
+
tag: "${{ steps.tag-validate.outputs.tag }}"
|
|
34
|
+
steps:
|
|
35
|
+
# Harden the runner used by this workflow
|
|
36
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
37
|
+
with:
|
|
38
|
+
egress-policy: 'audit'
|
|
39
|
+
|
|
40
|
+
- name: 'Verify Pushed Tag'
|
|
41
|
+
id: 'tag-validate'
|
|
42
|
+
# yamllint disable-line rule:line-length
|
|
43
|
+
uses: lfreleng-actions/tag-push-verify-action@80e2bdbbb9ee7b67557a31705892b75e75d2859e # v0.1.1
|
|
44
|
+
with:
|
|
45
|
+
versioning: 'semver'
|
|
46
|
+
|
|
47
|
+
python-build:
|
|
48
|
+
name: 'Python Build'
|
|
49
|
+
needs: 'tag-validate'
|
|
50
|
+
runs-on: 'ubuntu-latest'
|
|
51
|
+
outputs:
|
|
52
|
+
matrix_json: "${{ steps.python-build.outputs.matrix_json }}"
|
|
53
|
+
artefact_name: "${{ steps.python-build.outputs.artefact_name }}"
|
|
54
|
+
artefact_path: "${{ steps.python-build.outputs.artefact_path }}"
|
|
55
|
+
permissions:
|
|
56
|
+
contents: read
|
|
57
|
+
id-token: write # Needed for attestations
|
|
58
|
+
attestations: write # Needed for attestations
|
|
59
|
+
timeout-minutes: 12
|
|
60
|
+
env:
|
|
61
|
+
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
62
|
+
steps:
|
|
63
|
+
# Harden the runner used by this workflow
|
|
64
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
65
|
+
with:
|
|
66
|
+
egress-policy: 'audit'
|
|
67
|
+
|
|
68
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
69
|
+
|
|
70
|
+
# Setup Python with enhanced caching
|
|
71
|
+
# Setup Python with enhanced caching
|
|
72
|
+
- name: Set up Python
|
|
73
|
+
id: setup-python
|
|
74
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
75
|
+
with:
|
|
76
|
+
# Do NOT use hard-coded Python; extract from pyproject.toml
|
|
77
|
+
python-version-file: 'pyproject.toml'
|
|
78
|
+
cache: 'pip'
|
|
79
|
+
cache-dependency-path: pyproject.toml
|
|
80
|
+
|
|
81
|
+
# Cache UV dependencies for release build
|
|
82
|
+
- name: Cache UV release dependencies
|
|
83
|
+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
|
84
|
+
with:
|
|
85
|
+
path: |
|
|
86
|
+
~/.cache/uv
|
|
87
|
+
.venv
|
|
88
|
+
key: uv-release-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
|
|
89
|
+
restore-keys: |
|
|
90
|
+
uv-release-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
|
|
91
|
+
uv-release-${{ runner.os }}-
|
|
92
|
+
|
|
93
|
+
- name: 'Build Python project'
|
|
94
|
+
id: 'python-build'
|
|
95
|
+
# yamllint disable-line rule:line-length
|
|
96
|
+
uses: lfreleng-actions/python-build-action@e74a56d61b59b55516ee05037303528423d8ed5a # v1.0.0
|
|
97
|
+
with:
|
|
98
|
+
sigstore_sign: true
|
|
99
|
+
attestations: true
|
|
100
|
+
|
|
101
|
+
python-tests:
|
|
102
|
+
name: 'Python Tests'
|
|
103
|
+
runs-on: 'ubuntu-latest'
|
|
104
|
+
needs: 'python-build'
|
|
105
|
+
# Matrix job
|
|
106
|
+
strategy:
|
|
107
|
+
fail-fast: false
|
|
108
|
+
matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}"
|
|
109
|
+
permissions:
|
|
110
|
+
contents: read
|
|
111
|
+
timeout-minutes: 12
|
|
112
|
+
steps:
|
|
113
|
+
# Harden the runner used by this workflow
|
|
114
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
115
|
+
with:
|
|
116
|
+
egress-policy: 'audit'
|
|
117
|
+
|
|
118
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
119
|
+
|
|
120
|
+
# Setup Python with caching
|
|
121
|
+
- name: Set up Python
|
|
122
|
+
id: setup-python
|
|
123
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
124
|
+
with:
|
|
125
|
+
python-version: ${{ matrix.python-version }}
|
|
126
|
+
cache: 'pip'
|
|
127
|
+
cache-dependency-path: pyproject.toml
|
|
128
|
+
|
|
129
|
+
# Cache UV test dependencies
|
|
130
|
+
- name: Cache UV release test dependencies
|
|
131
|
+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
|
132
|
+
with:
|
|
133
|
+
path: |
|
|
134
|
+
~/.cache/uv
|
|
135
|
+
.venv
|
|
136
|
+
# yamllint disable-line rule:line-length
|
|
137
|
+
key: uv-release-test-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
|
|
138
|
+
restore-keys: |
|
|
139
|
+
uv-release-test-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
|
|
140
|
+
uv-release-test-${{ runner.os }}-
|
|
141
|
+
|
|
142
|
+
- name: 'Test Python project [PYTEST]'
|
|
143
|
+
# yamllint disable-line rule:line-length
|
|
144
|
+
uses: lfreleng-actions/python-test-action@92d4110d44ebc18fa4575c6b00203ff67d01a1cb # v1.0.1
|
|
145
|
+
with:
|
|
146
|
+
python_version: "${{ matrix.python-version }}"
|
|
147
|
+
|
|
148
|
+
python-audit:
|
|
149
|
+
name: 'Python Audit'
|
|
150
|
+
runs-on: 'ubuntu-latest'
|
|
151
|
+
needs: 'python-build'
|
|
152
|
+
# Matrix job
|
|
153
|
+
strategy:
|
|
154
|
+
fail-fast: false
|
|
155
|
+
matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}"
|
|
156
|
+
permissions:
|
|
157
|
+
contents: read
|
|
158
|
+
timeout-minutes: 10
|
|
159
|
+
steps:
|
|
160
|
+
# Harden the runner used by this workflow
|
|
161
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
162
|
+
with:
|
|
163
|
+
egress-policy: 'audit'
|
|
164
|
+
|
|
165
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
166
|
+
|
|
167
|
+
# Setup Python with caching
|
|
168
|
+
- name: Set up Python
|
|
169
|
+
id: setup-python
|
|
170
|
+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
|
|
171
|
+
with:
|
|
172
|
+
python-version: ${{ matrix.python-version }}
|
|
173
|
+
cache: 'pip'
|
|
174
|
+
cache-dependency-path: pyproject.toml
|
|
175
|
+
|
|
176
|
+
# Cache UV audit dependencies
|
|
177
|
+
- name: Cache UV release audit dependencies
|
|
178
|
+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
|
179
|
+
with:
|
|
180
|
+
path: |
|
|
181
|
+
~/.cache/uv
|
|
182
|
+
.venv
|
|
183
|
+
# yamllint disable-line rule:line-length
|
|
184
|
+
key: uv-release-audit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
|
|
185
|
+
restore-keys: |
|
|
186
|
+
uv-release-audit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
|
|
187
|
+
uv-release-audit-${{ runner.os }}-
|
|
188
|
+
|
|
189
|
+
- name: 'Audit Python project'
|
|
190
|
+
# yamllint disable-line rule:line-length
|
|
191
|
+
uses: lfreleng-actions/python-audit-action@d54ca0172525184e38779eaaaade7edf4ad22b89 # v0.2.4
|
|
192
|
+
with:
|
|
193
|
+
python_version: "${{ matrix.python-version }}"
|
|
194
|
+
|
|
195
|
+
test-pypi:
|
|
196
|
+
name: 'Test PyPI Publishing'
|
|
197
|
+
runs-on: 'ubuntu-latest'
|
|
198
|
+
needs:
|
|
199
|
+
- 'tag-validate'
|
|
200
|
+
- 'python-tests'
|
|
201
|
+
- 'python-audit'
|
|
202
|
+
environment:
|
|
203
|
+
name: 'development'
|
|
204
|
+
permissions:
|
|
205
|
+
contents: read
|
|
206
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
207
|
+
timeout-minutes: 5
|
|
208
|
+
steps:
|
|
209
|
+
# Harden the runner used by this workflow
|
|
210
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
211
|
+
with:
|
|
212
|
+
egress-policy: 'audit'
|
|
213
|
+
|
|
214
|
+
- name: 'Test PyPI publishing'
|
|
215
|
+
# yamllint disable-line rule:line-length
|
|
216
|
+
uses: lfreleng-actions/pypi-publish-action@81a056957ed050f8305760055b1fd8103a916989 # v0.1.1
|
|
217
|
+
with:
|
|
218
|
+
environment: 'development'
|
|
219
|
+
tag: "${{ needs.tag-validate.outputs.tag }}"
|
|
220
|
+
|
|
221
|
+
docker-publish:
|
|
222
|
+
name: 'Publish Docker Image'
|
|
223
|
+
runs-on: 'ubuntu-latest'
|
|
224
|
+
needs:
|
|
225
|
+
- 'tag-validate'
|
|
226
|
+
- 'test-pypi'
|
|
227
|
+
timeout-minutes: 15
|
|
228
|
+
permissions:
|
|
229
|
+
contents: read
|
|
230
|
+
packages: write
|
|
231
|
+
steps:
|
|
232
|
+
# Harden the runner used by this workflow
|
|
233
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
234
|
+
with:
|
|
235
|
+
egress-policy: 'audit'
|
|
236
|
+
|
|
237
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
238
|
+
|
|
239
|
+
# Set up Docker Buildx
|
|
240
|
+
- name: Set up Docker Buildx
|
|
241
|
+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
|
242
|
+
|
|
243
|
+
# Login to GitHub Container Registry
|
|
244
|
+
- name: Login to Container Registry
|
|
245
|
+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
|
246
|
+
with:
|
|
247
|
+
registry: ${{ env.REGISTRY }}
|
|
248
|
+
username: ${{ github.actor }}
|
|
249
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
250
|
+
|
|
251
|
+
# Extract metadata for tags and labels
|
|
252
|
+
- name: Extract metadata
|
|
253
|
+
id: meta
|
|
254
|
+
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
|
|
255
|
+
with:
|
|
256
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
257
|
+
tags: |
|
|
258
|
+
type=semver,pattern={{version}},value=${{ needs.tag-validate.outputs.tag }}
|
|
259
|
+
type=semver,pattern={{major}}.{{minor}},value=${{ needs.tag-validate.outputs.tag }}
|
|
260
|
+
type=semver,pattern={{major}},value=${{ needs.tag-validate.outputs.tag }}
|
|
261
|
+
type=raw,value=latest
|
|
262
|
+
labels: |
|
|
263
|
+
org.opencontainers.image.title=HTTP API Tool
|
|
264
|
+
org.opencontainers.image.description=A Python HTTP/HTTPS API testing tool for GitHub Actions and CLI usage
|
|
265
|
+
org.opencontainers.image.vendor=The Linux Foundation
|
|
266
|
+
org.opencontainers.image.version=${{ needs.tag-validate.outputs.tag }}
|
|
267
|
+
|
|
268
|
+
# Build and push image with comprehensive caching
|
|
269
|
+
- name: Build and push Docker image
|
|
270
|
+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
|
271
|
+
with:
|
|
272
|
+
context: .
|
|
273
|
+
file: ./docker/Containerfile
|
|
274
|
+
platforms: linux/amd64,linux/arm64
|
|
275
|
+
push: true
|
|
276
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
277
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
278
|
+
build-args: |
|
|
279
|
+
VERSION=${{ needs.tag-validate.outputs.tag }}
|
|
280
|
+
cache-from: |
|
|
281
|
+
type=gha,scope=docker-release
|
|
282
|
+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-base
|
|
283
|
+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-deps
|
|
284
|
+
cache-to: |
|
|
285
|
+
type=gha,mode=max,scope=docker-release
|
|
286
|
+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-base,mode=max
|
|
287
|
+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:cache-deps,mode=max
|
|
288
|
+
|
|
289
|
+
- name: Verify published image
|
|
290
|
+
run: |
|
|
291
|
+
echo "✅ Docker image published successfully to GHCR"
|
|
292
|
+
echo "📦 Version: ${{ needs.tag-validate.outputs.tag }}"
|
|
293
|
+
echo "🏷️ Tags: ${{ steps.meta.outputs.tags }}"
|
|
294
|
+
|
|
295
|
+
pypi:
|
|
296
|
+
name: 'Release PyPI Package'
|
|
297
|
+
runs-on: 'ubuntu-latest'
|
|
298
|
+
needs:
|
|
299
|
+
- 'tag-validate'
|
|
300
|
+
- 'test-pypi'
|
|
301
|
+
environment:
|
|
302
|
+
name: 'production'
|
|
303
|
+
permissions:
|
|
304
|
+
contents: read
|
|
305
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
306
|
+
timeout-minutes: 5
|
|
307
|
+
steps:
|
|
308
|
+
# Harden the runner used by this workflow
|
|
309
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
310
|
+
with:
|
|
311
|
+
egress-policy: 'audit'
|
|
312
|
+
|
|
313
|
+
- name: 'PyPI release'
|
|
314
|
+
# yamllint disable-line rule:line-length
|
|
315
|
+
uses: lfreleng-actions/pypi-publish-action@81a056957ed050f8305760055b1fd8103a916989 # v0.1.1
|
|
316
|
+
with:
|
|
317
|
+
environment: 'production'
|
|
318
|
+
attestations: true
|
|
319
|
+
tag: "${{ needs.tag-validate.outputs.tag }}"
|
|
320
|
+
|
|
321
|
+
promote-release:
|
|
322
|
+
name: 'Promote Draft Release'
|
|
323
|
+
# yamllint disable-line rule:line-length
|
|
324
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
325
|
+
needs:
|
|
326
|
+
- 'tag-validate'
|
|
327
|
+
- 'pypi'
|
|
328
|
+
- 'docker-publish'
|
|
329
|
+
runs-on: 'ubuntu-latest'
|
|
330
|
+
permissions:
|
|
331
|
+
contents: write # IMPORTANT: needed to edit a draft release and promote it
|
|
332
|
+
timeout-minutes: 2
|
|
333
|
+
outputs:
|
|
334
|
+
release_url: "${{ steps.promote-release.outputs.release_url }}"
|
|
335
|
+
steps:
|
|
336
|
+
# Harden the runner used by this workflow
|
|
337
|
+
# yamllint disable-line rule:line-length
|
|
338
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
339
|
+
with:
|
|
340
|
+
egress-policy: 'audit'
|
|
341
|
+
|
|
342
|
+
# yamllint disable-line rule:line-length
|
|
343
|
+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
344
|
+
|
|
345
|
+
- name: 'Promote draft release'
|
|
346
|
+
id: 'promote-release'
|
|
347
|
+
# yamllint disable-line rule:line-length
|
|
348
|
+
uses: lfreleng-actions/draft-release-promote-action@cd7cf442875ecaea5dbb070d0de94f21ece107c8 # v0.1.3
|
|
349
|
+
with:
|
|
350
|
+
token: "${{ secrets.GITHUB_TOKEN }}"
|
|
351
|
+
tag: "${{ needs.tag-validate.outputs.tag }}"
|
|
352
|
+
latest: true
|
|
353
|
+
|
|
354
|
+
# Need to attach build artefacts to the release
|
|
355
|
+
# This step could potentially be moved
|
|
356
|
+
# (May be better to when/where the release is still in draft state)
|
|
357
|
+
attach-artefacts:
|
|
358
|
+
name: 'Attach Artefacts to Release'
|
|
359
|
+
runs-on: 'ubuntu-latest'
|
|
360
|
+
needs:
|
|
361
|
+
- 'tag-validate'
|
|
362
|
+
- 'python-build'
|
|
363
|
+
- 'promote-release'
|
|
364
|
+
permissions:
|
|
365
|
+
contents: write # IMPORTANT: needed to edit the release and attach artefacts
|
|
366
|
+
timeout-minutes: 5
|
|
367
|
+
steps:
|
|
368
|
+
# Harden the runner used by this workflow
|
|
369
|
+
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
|
|
370
|
+
with:
|
|
371
|
+
egress-policy: 'audit'
|
|
372
|
+
|
|
373
|
+
# Note: no need for a checkout step in this job
|
|
374
|
+
|
|
375
|
+
- name: '⬇ Download build artefacts'
|
|
376
|
+
# yamllint disable-line rule:line-length
|
|
377
|
+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
|
|
378
|
+
with:
|
|
379
|
+
name: "${{ needs.python-build.outputs.artefact_name }}"
|
|
380
|
+
path: "${{ needs.python-build.outputs.artefact_path }}"
|
|
381
|
+
|
|
382
|
+
- name: 'Attach build artefacts to release'
|
|
383
|
+
# yamllint disable-line rule:line-length
|
|
384
|
+
uses: alexellis/upload-assets@13926a61cdb2cb35f5fdef1c06b8b591523236d3 # 0.4.1
|
|
385
|
+
env:
|
|
386
|
+
GITHUB_TOKEN: "${{ github.token }}"
|
|
387
|
+
with:
|
|
388
|
+
asset_paths: '["${{ needs.python-build.outputs.artefact_path }}/**"]'
|