-
Notifications
You must be signed in to change notification settings - Fork 4
151 lines (143 loc) · 6.47 KB
/
Copy pathrelease-please.yml
File metadata and controls
151 lines (143 loc) · 6.47 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-22.04
outputs:
package-client-released: ${{ steps.release.outputs['libs/client-sdk--release_created'] }}
package-client-tag: ${{ steps.release.outputs['libs/client-sdk--tag_name'] }}
package-server-released: ${{ steps.release.outputs['libs/server-sdk--release_created'] }}
package-server-tag: ${{ steps.release.outputs['libs/server-sdk--tag_name'] }}
package-server-redis-released: ${{ steps.release.outputs['libs/server-sdk-redis-source--release_created'] }}
package-server-redis-tag: ${{ steps.release.outputs['libs/server-sdk-redis-source--tag_name'] }}
package-server-otel-released: ${{ steps.release.outputs['libs/server-sdk-otel--release_created'] }}
package-server-otel-tag: ${{ steps.release.outputs['libs/server-sdk-otel--tag_name'] }}
steps:
# https://github.com/googleapis/release-please-action/releases/tag/v4.3.0
- uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-client:
strategy:
matrix:
# Each of the platforms for which release-artifacts need generated.
os: [ ubuntu-22.04, windows-2022, macos-13 ]
runs-on: ${{ matrix.os }}
needs: [ 'release-please' ]
if: ${{ needs.release-please.outputs.package-client-released == 'true'}}
outputs:
hashes-linux: ${{ steps.release-client.outputs.hashes-linux }}
hashes-windows: ${{ steps.release-client.outputs.hashes-windows }}
hashes-macos: ${{ steps.release-client.outputs.hashes-macos }}
steps:
# https://github.com/actions/checkout/releases/tag/v4.3.0
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- id: release-client
name: Full release of libs/client-sdk
uses: ./.github/actions/sdk-release
with:
# The tag of the release to upload artifacts to.
tag_name: ${{ needs.release-please.outputs.package-client-tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: 'libs/client-sdk'
sdk_cmake_target: 'launchdarkly-cpp-client'
release-server:
strategy:
matrix:
# Each of the platforms for which release-artifacts need generated.
os: [ ubuntu-22.04, windows-2022, macos-13 ]
runs-on: ${{ matrix.os }}
needs: [ 'release-please' ]
if: ${{ needs.release-please.outputs.package-server-released == 'true'}}
outputs:
hashes-linux: ${{ steps.release-server.outputs.hashes-linux }}
hashes-windows: ${{ steps.release-server.outputs.hashes-windows }}
hashes-macos: ${{ steps.release-server.outputs.hashes-macos }}
steps:
# https://github.com/actions/checkout/releases/tag/v4.3.0
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- id: release-server
name: Full release of libs/server-sdk
uses: ./.github/actions/sdk-release
with:
# The tag of the release to upload artifacts to.
tag_name: ${{ needs.release-please.outputs.package-server-tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: 'libs/server-sdk'
sdk_cmake_target: 'launchdarkly-cpp-server'
release-server-redis:
strategy:
matrix:
# Each of the platforms for which release-artifacts need generated.
os: [ ubuntu-22.04, windows-2022, macos-13 ]
runs-on: ${{ matrix.os }}
needs: [ 'release-please' ]
if: ${{ needs.release-please.outputs.package-server-redis-released == 'true'}}
outputs:
hashes-linux: ${{ steps.release-server-redis.outputs.hashes-linux }}
hashes-windows: ${{ steps.release-server-redis.outputs.hashes-windows }}
hashes-macos: ${{ steps.release-server-redis.outputs.hashes-macos }}
steps:
# https://github.com/actions/checkout/releases/tag/v4.3.0
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
- id: release-server-redis
name: Full release of libs/server-sdk-redis-source
uses: ./.github/actions/sdk-release
with:
# The tag of the release to upload artifacts to.
tag_name: ${{ needs.release-please.outputs.package-server-redis-tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: 'libs/server-sdk-redis-source'
sdk_cmake_target: 'launchdarkly-cpp-server-redis-source'
release-client-provenance:
needs: [ 'release-please', 'release-client' ]
strategy:
matrix:
# Generates a combined attestation for each platform
os: [ linux, windows, macos ]
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
with:
base64-subjects: "${{ needs.release-client.outputs[format('hashes-{0}', matrix.os)] }}"
upload-assets: true
upload-tag-name: ${{ needs.release-please.outputs.package-client-tag }}
provenance-name: ${{ format('{0}-client-multiple-provenance.intoto.jsonl', matrix.os) }}
release-server-provenance:
needs: [ 'release-please', 'release-server' ]
strategy:
matrix:
# Generates a combined attestation for each platform
os: [ linux, windows, macos ]
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
with:
base64-subjects: "${{ needs.release-server.outputs[format('hashes-{0}', matrix.os)] }}"
upload-assets: true
upload-tag-name: ${{ needs.release-please.outputs.package-server-tag }}
provenance-name: ${{ format('{0}-server-multiple-provenance.intoto.jsonl', matrix.os) }}
release-server-redis-provenance:
needs: [ 'release-please', 'release-server-redis' ]
strategy:
matrix:
# Generates a combined attestation for each platform
os: [ linux, windows, macos ]
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0
with:
base64-subjects: "${{ needs.release-server-redis.outputs[format('hashes-{0}', matrix.os)] }}"
upload-assets: true
upload-tag-name: ${{ needs.release-please.outputs.package-server-redis-tag }}
provenance-name: ${{ format('{0}-server-redis-multiple-provenance.intoto.jsonl', matrix.os) }}