-
Notifications
You must be signed in to change notification settings - Fork 1.1k
104 lines (95 loc) 路 2.8 KB
/
on-pr.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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Pull Request
permissions:
# To create a draft release.
contents: write
# To comment on PRs.
pull-requests: write
# To sign artifacts.
id-token: write
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changelog-comment:
name: changelog preview
permissions:
contents: read
pull-requests: write
uses: ./.github/workflows/on-pr-changelog.yml
with:
ref: ${{ github.ref }}
base-ref: origin/${{ github.base_ref }}
pr-number: ${{ github.event.pull_request.number }}
changelog-required: ${{ !contains(github.event.pull_request.labels.*.name, 'impact/no-changelog-required') }}
secrets: inherit
info:
name: info
uses: ./.github/workflows/ci-info.yml
permissions:
contents: read
with:
ref: ${{ github.ref }}
is-snapshot: true
secrets: inherit
ci:
name: CI
needs: [info]
uses: ./.github/workflows/ci.yml
permissions:
contents: read
# To sign artifacts.
id-token: write
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
lint: true
build-all-targets: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
test-version-sets: >- # No newlines or trailing newline.
${{
contains(github.event.pull_request.labels.*.name, 'ci/test')
&& 'minimum current'
|| 'current'
}}
integration-test-platforms: ubuntu-latest
smoke-test-platforms: >- # No newlines or trailing newline.
${{
contains(github.event.pull_request.labels.*.name, 'ci/test')
&& 'macos-11 windows-latest'
|| ''
}}
enable-coverage: true
secrets: inherit
prepare-release:
name: prepare
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
needs: [info, ci]
uses: ./.github/workflows/ci-prepare-release.yml
permissions:
contents: write
# To sign artifacts.
id-token: write
with:
ref: ${{ github.ref }}
version: ${{ needs.info.outputs.version }}
release-notes: ${{ needs.info.outputs.release-notes }}
project: ${{ github.repository }}
draft: true
prerelease: true
secrets: inherit
# release:
# name: release
# if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/test') }}
# needs: [info, matrix, prepare-release]
# uses: ./.github/workflows/release.yml
# permissions:
# contents: write
# pull-requests: write
# with:
# ref: ${{ github.ref }}
# version: ${{ needs.info.outputs.version }}
# release-notes: ${{ needs.info.outputs.release-notes }}
# version-set: ${{ needs.matrix.outputs.version-set }}
# queue-merge: false
# secrets: inherit