This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
90 lines (85 loc) · 3.39 KB
/
manual-publish.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
name: Manual Publish Package
on:
workflow_dispatch:
inputs:
pkg_name:
description: 'The package to publish'
required: true
type: choice
options:
- LaunchDarkly.ServerSdk
- LaunchDarkly.ServerSdk.Telemetry
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
generate_provenance:
description: 'Whether or not to generate provenance for this manual publish. Default behavior: generate only on main branch.'
type: choice
options:
- Default
- Generate
- Do not generate
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
outputs:
server-sdk-hashes: ${{ steps.server-sdk-release.outputs.hashes }}
telemetry-hashes: ${{ steps.telemetry-release.outputs.hashes }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/full-release
id: server-sdk-release
if: ${{ inputs.pkg_name == 'LaunchDarkly.ServerSdk' }}
with:
workspace_path: 'pkgs/sdk/server'
project_file: 'pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj'
test_project_file: 'pkgs/sdk/server/test/LaunchDarkly.ServerSdk.Tests.csproj'
build_output_path: 'pkgs/sdk/server/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.dll'
dry_run: ${{ inputs.dry_run }}
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/full-release
id: telemetry-release
if: ${{ inputs.pkg_name == 'LaunchDarkly.ServerSdk.Telemetry' }}
with:
workspace_path: 'pkgs/telemetry'
project_file: 'pkgs/telemetry/src/LaunchDarkly.ServerSdk.Telemetry.csproj'
test_project_file: 'pkgs/telemetry/test/LaunchDarkly.ServerSdk.Telemetry.Tests.csproj'
build_output_path: 'pkgs/telemetry/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.Telemetry.dll'
dry_run: ${{ inputs.dry_run }}
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}
release-sdk-server-provenance:
needs: ['build']
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
if: |
(inputs.generate_provenance == 'Generate' || (inputs.generate_provenance == 'Default' && github.ref_name == 'main')) &&
inputs.pkg_name == 'LaunchDarkly.ServerSdk'
with:
base64-subjects: "${{ needs.build.outputs.server-sdk-hashes }}"
upload-assets: true
provenance-name: ${{ 'LaunchDarkly.ServerSdk_provenance.intoto.jsonl' }}
release-telemetry-server-provenance:
needs: ['build']
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
if: |
(inputs.generate_provenance == 'Generate' || (inputs.generate_provenance == 'Default' && github.ref_name == 'main')) &&
inputs.pkg_name == 'LaunchDarkly.ServerSdk.Telemetry'
with:
base64-subjects: "${{ needs.build.outputs.telemetry-hashes }}"
upload-assets: true
provenance-name: ${{ 'LaunchDarkly.ServerSdk.Telemetry_provenance.intoto.jsonl' }}