Skip to content

Commit ab29f53

Browse files
authored
chore: sign and publish as .NET foundation (#8931)
1 parent a6d356c commit ab29f53

File tree

3 files changed

+36
-101
lines changed

3 files changed

+36
-101
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,51 @@ jobs:
3232
- name: dotnet pack
3333
run: dotnet pack -c Release /p:Version=${GITHUB_REF_NAME#v} -o drop/nuget
3434

35-
- uses: actions/upload-artifact@v3
36-
with:
37-
name: nuget
38-
path: drop/nuget
39-
4035
- name: dotnet publish
4136
run: |
4237
dotnet publish src/docfx -f net7.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r win-x64 -o drop/publish/win-x64
4338
dotnet publish src/docfx -f net7.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r linux-x64 -o drop/publish/linux-x64
4439
dotnet publish src/docfx -f net7.0 -c Release /p:Version=${GITHUB_REF_NAME#v} --self-contained -r osx-x64 -o drop/publish/osx-x64
4540
mkdir -p drop/bin
4641
42+
- run: dotnet tool install --tool-path . sign --version 0.9.1-beta.23274.1
43+
44+
- run: >
45+
./sign code azure-key-vault
46+
drop/nuget/**/*.*
47+
--description "Docfx code sign"
48+
--description-url "https://dotnet.github.io/docfx"
49+
--azure-key-vault-managed-identity true
50+
--azure-key-vault-url "${{ secrets.SIGN_KEY_VAULT_URL }}"
51+
--azure-key-vault-certificate "${{ secrets.SIGN_KEY_VAULT_CERTIFICATE }}"
52+
--azure-key-vault-tenant-id "${{ secrets.SIGN_KEY_VAULT_TENANT_ID }}"
53+
--azure-key-vault-client-id "${{ secrets.SIGN_KEY_VAULT_CLIENT_ID }}"
54+
--azure-key-vault-client-secret "${{ secrets.SIGN_KEY_VAULT_CLIENT_SECRET }}"
55+
56+
- run: >
57+
./sign code azure-key-vault
58+
bin/**/*.*
59+
--description "Docfx code sign"
60+
--description-url "https://dotnet.github.io/docfx"
61+
--azure-key-vault-managed-identity true
62+
--azure-key-vault-url "${{ secrets.SIGN_KEY_VAULT_URL }}"
63+
--azure-key-vault-certificate "${{ secrets.SIGN_KEY_VAULT_CERTIFICATE }}"
64+
--azure-key-vault-tenant-id "${{ secrets.SIGN_KEY_VAULT_TENANT_ID }}"
65+
--azure-key-vault-client-id "${{ secrets.SIGN_KEY_VAULT_CLIENT_ID }}"
66+
--azure-key-vault-client-secret "${{ secrets.SIGN_KEY_VAULT_CLIENT_SECRET }}"
67+
4768
- run: zip -r ../../bin/docfx-win-x64-${GITHUB_REF_NAME}.zip .
4869
working-directory: drop/publish/win-x64
4970
- run: zip -r ../../bin/docfx-linux-x64-${GITHUB_REF_NAME}.zip .
5071
working-directory: drop/publish/linux-x64
5172
- run: zip -r ../../bin/docfx-osx-x64-${GITHUB_REF_NAME}.zip .
5273
working-directory: drop/publish/osx-x64
5374

75+
- uses: actions/upload-artifact@v3
76+
with:
77+
name: nuget
78+
path: drop/nuget
79+
5480
- uses: actions/upload-artifact@v3
5581
with:
5682
name: bin
@@ -64,11 +90,7 @@ jobs:
6490
env:
6591
GH_TOKEN: ${{ github.token }}
6692

67-
# Run publish as the last step as `gh run download` does not download actions in running state
68-
- name: publish
69-
uses: Azure/[email protected]
70-
with:
71-
azure-devops-project-url: https://dev.azure.com/ceapex/Engineering
72-
azure-pipeline-name: 'dotnet.docfx'
73-
azure-devops-token: ${{ secrets.AZURE_DEVOPS_TOKEN }}
74-
azure-pipeline-variables: '{"GH_RUNID": "${{github.run_id}}"}'
93+
- run: |
94+
dotnet nuget push $(Pipeline.Workspace)\nuget\*.nupkg --api-key $env:NUGET_KEY --skip-duplicate --source https://nuget.org
95+
env:
96+
NUGET_KEY: $(NUGET_KEY)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<Authors>Microsoft</Authors>
2929
<Company>Microsoft</Company>
30-
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
30+
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
3131

3232
<PackageReadmeFile>README.md</PackageReadmeFile>
3333
<PackageProjectUrl>https://github.com/dotnet/docfx</PackageProjectUrl>

publish.yml

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

0 commit comments

Comments
 (0)