Skip to content

Commit b10edc6

Browse files
Merge pull request #209 from tannergooding/main
Updating repo infrastructure and use new sign client
2 parents 6e8e5de + 543a972 commit b10edc6

File tree

6 files changed

+59
-41
lines changed

6 files changed

+59
-41
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: ci
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, v* ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, v* ]
8+
workflow_dispatch:
89

910
jobs:
1011
windows-x64:
@@ -40,7 +41,7 @@ jobs:
4041
shell: cmd
4142
- uses: actions/upload-artifact@v3
4243
with:
43-
name: ${{ matrix.os }}_${{ matrix.configuration }}_x86
44+
name: ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
4445
path: |
4546
./artifacts/bin/**/*
4647
./artifacts/log/**/*
@@ -96,14 +97,6 @@ jobs:
9697
env:
9798
EXCLUDE_RUN_ID_FROM_PACKAGE: true
9899
EXCLUDE_SUFFIX_FROM_VERSION: false
99-
- uses: actions/setup-dotnet@v2
100-
if: ${{ github.event_name == 'push' }}
101-
with:
102-
dotnet-version: '6.0.x'
103-
- run: dotnet tool install --tool-path ./artifacts/tools SignClient
104-
if: ${{ github.event_name == 'push' }}
105-
- run: ./artifacts/tools/SignClient "Sign" --baseDirectory "${{ github.workspace }}/artifacts/pkg" --input "**/*.nupkg" --config "${{ github.workspace }}/scripts/SignClientSettings.json" --filelist "${{ github.workspace }}/scripts/SignClientFileList.txt" --user "${{ secrets.SC_USER }}" --secret "${{ secrets.SC_PASS }}" --name "ClangSharp" --description "ClangSharp" --descriptionUrl "https://github.com/dotnet/clangsharp"
106-
if: ${{ github.event_name == 'push' }}
107100
- uses: actions/upload-artifact@v3
108101
with:
109102
name: nuget_preview
@@ -113,6 +106,29 @@ jobs:
113106
./artifacts/pkg/**/*
114107
./artifacts/tst/**/*
115108
if-no-files-found: error
109+
sign-nuget-preview:
110+
runs-on: windows-latest
111+
if: ${{ github.event_name == 'push' }}
112+
needs: [ build-nuget-preview ]
113+
permissions:
114+
id-token: write
115+
steps:
116+
- uses: actions/checkout@v3
117+
- uses: actions/download-artifact@v3
118+
with:
119+
name: nuget_preview
120+
path: ./artifacts
121+
- uses: actions/setup-dotnet@v3
122+
with:
123+
dotnet-version: '6.0.x'
124+
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
125+
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "LLVMSharp" --description-url "https://github.com/dotnet/llvmsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
126+
- uses: actions/upload-artifact@v3
127+
with:
128+
name: sign_nuget_preview
129+
path: |
130+
./artifacts/pkg/**/*
131+
if-no-files-found: error
116132
build-nuget-release:
117133
runs-on: windows-latest
118134
steps:
@@ -122,14 +138,6 @@ jobs:
122138
env:
123139
EXCLUDE_RUN_ID_FROM_PACKAGE: true
124140
EXCLUDE_SUFFIX_FROM_VERSION: true
125-
- uses: actions/setup-dotnet@v2
126-
if: ${{ github.event_name == 'push' }}
127-
with:
128-
dotnet-version: '6.0.x'
129-
- run: dotnet tool install --tool-path ./artifacts/tools SignClient
130-
if: ${{ github.event_name == 'push' }}
131-
- run: ./artifacts/tools/SignClient "Sign" --baseDirectory "${{ github.workspace }}/artifacts/pkg" --input "**/*.nupkg" --config "${{ github.workspace }}/scripts/SignClientSettings.json" --filelist "${{ github.workspace }}/scripts/SignClientFileList.txt" --user "${{ secrets.SC_USER }}" --secret "${{ secrets.SC_PASS }}" --name "ClangSharp" --description "ClangSharp" --descriptionUrl "https://github.com/dotnet/clangsharp"
132-
if: ${{ github.event_name == 'push' }}
133141
- uses: actions/upload-artifact@v3
134142
with:
135143
name: nuget_release
@@ -139,12 +147,35 @@ jobs:
139147
./artifacts/pkg/**/*
140148
./artifacts/tst/**/*
141149
if-no-files-found: error
150+
sign-nuget-release:
151+
runs-on: windows-latest
152+
if: ${{ github.event_name == 'push' }}
153+
needs: [ build-nuget-release ]
154+
permissions:
155+
id-token: write
156+
steps:
157+
- uses: actions/checkout@v3
158+
- uses: actions/download-artifact@v3
159+
with:
160+
name: nuget_release
161+
path: ./artifacts
162+
- uses: actions/setup-dotnet@v3
163+
with:
164+
dotnet-version: '6.0.x'
165+
- run: dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
166+
- run: ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "LLVMSharp" --description-url "https://github.com/dotnet/llvmsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
167+
- uses: actions/upload-artifact@v3
168+
with:
169+
name: sign_nuget_release
170+
path: |
171+
./artifacts/pkg/**/*
172+
if-no-files-found: error
142173
publish-nightlies-azure:
143174
runs-on: ubuntu-latest
144175
if: ${{ github.event_name == 'push' }}
145-
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, build-nuget-preview ]
176+
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, sign-nuget-preview, sign-nuget-release ]
146177
steps:
147-
- uses: actions/download-artifact@v2
178+
- uses: actions/download-artifact@v3
148179
with:
149180
name: windows_release_x64
150181
path: ./artifacts
@@ -158,9 +189,9 @@ jobs:
158189
publish-nightlies-github:
159190
runs-on: ubuntu-latest
160191
if: false
161-
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, build-nuget-preview ]
192+
needs: [ windows-x64, windows-x86, linux-x64, macos-x64, sign-nuget-preview, sign-nuget-release ]
162193
steps:
163-
- uses: actions/download-artifact@v2
194+
- uses: actions/download-artifact@v3
164195
with:
165196
name: windows_release_x64
166197
path: ./artifacts

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<Product>LLVMSharp</Product>
4747
<RootNamespace>LLVMSharp</RootNamespace>
4848
<VersionPrefix>15.0.0</VersionPrefix>
49-
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">beta2</VersionSuffix>
49+
<VersionSuffix Condition="'$(EXCLUDE_SUFFIX_FROM_VERSION)' != 'true'">rc1</VersionSuffix>
5050
<VersionSuffix Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">pr</VersionSuffix>
5151
</PropertyGroup>
5252

Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<ItemGroup>
1515
<PackageVersion Include="libLLVM" Version="15.0.0" />
1616
<PackageVersion Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
17-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
17+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
1818
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
1919
<PackageVersion Include="NUnit" Version="3.13.3" />
20-
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
20+
<PackageVersion Include="NUnit3TestAdapter" Version="4.3.1" />
2121
<PackageVersion Include="System.Memory" Version="4.5.5" />
2222
</ItemGroup>
2323

scripts/SignClientSettings.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

scripts/build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ try {
124124
Create-Directory -Path $DotNetInstallDirectory
125125

126126
& $DotNetInstallScript -Channel 6.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
127-
& $DotNetInstallScript -Channel 7.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture -Quality preview
127+
& $DotNetInstallScript -Channel 7.0 -Version latest -InstallDir $DotNetInstallDirectory -Architecture $architecture
128128

129129
$env:PATH="$DotNetInstallDirectory;$env:PATH"
130130
}

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ if [[ ! -z "$architecture" ]]; then
205205
CreateDirectory "$DotNetInstallDirectory"
206206

207207
. "$DotNetInstallScript" --channel 6.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
208-
. "$DotNetInstallScript" --channel 7.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture" --quality preview
208+
. "$DotNetInstallScript" --channel 7.0 --version latest --install-dir "$DotNetInstallDirectory" --architecture "$architecture"
209209

210210
PATH="$DotNetInstallDirectory:$PATH:"
211211
fi

0 commit comments

Comments
 (0)