Skip to content

Commit c7c0271

Browse files
chore: added push to deploy
1 parent 0408a7e commit c7c0271

File tree

1 file changed

+24
-38
lines changed

1 file changed

+24
-38
lines changed

.github/workflows/test-and-deploy.yml

+24-38
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ jobs:
4646
dotnet tool install --global dotnet-sonarscanner --version 5.5.3
4747
make cover
4848
49-
import-certificate:
50-
runs-on: windows-latest
51-
steps:
52-
- uses: actions/checkout@v2
53-
- run: make install
54-
- name: import-certificate
55-
run: |
56-
New-Item -ItemType directory -Path certificate
57-
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.CODE_SIGNING_CERTIFICATE }}'
58-
certutil -decode certificate\certificate.txt certificate\certificate.pfx
59-
60-
- name: Upload Artifact
61-
uses: actions/upload-artifact@v3
62-
with:
63-
name: certificate.pfx
64-
path: certificate\certificate.pfx
65-
retention-days: 1
49+
# import-certificate:
50+
# runs-on: windows-latest
51+
# steps:
52+
# - uses: actions/checkout@v2
53+
# - run: make install
54+
# - name: import-certificate
55+
# run: |
56+
# New-Item -ItemType directory -Path certificate
57+
# Set-Content -Path certificate\certificate.txt -Value '${{ secrets.CODE_SIGNING_CERTIFICATE }}'
58+
# certutil -decode certificate\certificate.txt certificate\certificate.pfx
59+
#
60+
# - name: Upload Artifact
61+
# uses: actions/upload-artifact@v3
62+
# with:
63+
# name: certificate.pfx
64+
# path: certificate\certificate.pfx
65+
# retention-days: 1
6666

6767
code-signing:
6868
runs-on: windows-latest
@@ -124,28 +124,10 @@ jobs:
124124
mkdir D:\a\stm-github-action-demo\stm-github-action-demo\dist\
125125
shell: cmd
126126

127-
- name: Debug Android Build Tools
128-
run: |
129-
ls D:\a\stm-github-action-demo\stm-github-action-demo\
130-
131-
- name: Signing using Nuget
132-
run: |
133-
make release
134-
copy D:\a\stm-github-action-demo\stm-github-action-demo\UNSIGNED.nupkg D:\a\stm-github-action-demo\stm-github-action-demo\dist\UNSIGNED.nupkg
135-
nuget sign "D:\a\stm-github-action-demo\stm-github-action-demo\dist\UNSIGNED.nupkg" -Timestamper http://timestamp.digicert.com -outputdirectory "D:\a\stm-github-action-demo\stm-github-action-demo\dist\NugetSigned" -CertificateFingerprint ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} -HashAlgorithm SHA256 -Verbosity detailed -Overwrite
136-
nuget verify -All "D:\a\stm-github-action-demo\stm-github-action-demo\dist\NugetSigned\*"
137-
138-
- name: Upload artifacts
139-
uses: actions/upload-artifact@v2
140-
with:
141-
name: windows-latest
142-
path: |
143-
dist
144-
145127
deploy:
146128
name: Deploy
147129
if: success() && github.ref_type == 'tag'
148-
needs: [ test, import-certificate ]
130+
needs: [ test, code-signing ]
149131
runs-on: ubuntu-latest
150132
steps:
151133
- name: Checkout twilio-csharp
@@ -186,8 +168,12 @@ jobs:
186168
- name: Publish package to NuGet
187169
run: |
188170
make release
189-
dotnet nuget sign **/*.nupkg --certificate-path certificate.pfx --certificate-password ${{ secrets.CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com
190-
dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
171+
# dotnet nuget sign **/*.nupkg --certificate-path certificate.pfx --certificate-password ${{ secrets.CERTIFICATE_PASSWORD }} --timestamper http://timestamp.digicert.com
172+
# dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
173+
copy D:\a\stm-github-action-demo\stm-github-action-demo\UNSIGNED.nupkg D:\a\stm-github-action-demo\stm-github-action-demo\dist\UNSIGNED.nupkg
174+
nuget sign "D:\a\stm-github-action-demo\stm-github-action-demo\dist\UNSIGNED.nupkg" -Timestamper http://timestamp.digicert.com -outputdirectory "D:\a\stm-github-action-demo\stm-github-action-demo\dist\NugetSigned" -CertificateFingerprint ${{ secrets.SM_CODE_SIGNING_CERT_SHA1_HASH }} -HashAlgorithm SHA256 -Verbosity detailed -Overwrite
175+
nuget verify -All "D:\a\stm-github-action-demo\stm-github-action-demo\dist\NugetSigned\*"
176+
nuget push "D:\a\stm-github-action-demo\stm-github-action-demo\dist\UNSIGNED.nupkg" -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
191177

192178
- name: Submit metric to Datadog
193179
uses: sendgrid/dx-automator/actions/datadog-release-metric@main

0 commit comments

Comments
 (0)