-
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) 路 1.57 KB
/
Copy pathrelease.yml
File metadata and controls
59 lines (51 loc) 路 1.57 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
name: Release
on:
workflow_run:
workflows: ["Run Tests"]
types: [completed]
branches:
- main
workflow_dispatch:
inputs:
release_sha:
description: Full commit SHA on main to release
required: true
type: string
permissions:
actions: read
contents: write
id-token: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
concurrency:
group: release-main
cancel-in-progress: false
jobs:
publish:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
github.event.workflow_run.head_branch == 'main')
runs-on: ubuntu-24.04
environment: pypi
env:
RELEASE_SHA: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || inputs.release_sha }}
RELEASE_BRANCH: main
REQUIRED_TEST_RUN_ID: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || '' }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 0
ref: ${{ env.RELEASE_SHA }}
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
version: "0.10.6"
enable-cache: true
- name: Publish tested commit
env:
GH_TOKEN: ${{ secrets.RELEASE_GH_TOKEN || github.token }}
run: ./bin/release.sh