Skip to content

Commit 5ca1e38

Browse files
authored
Merge pull request #141 from unoplatform/dev/jela/adjust-environment
ci: Add environment for nuget publish
2 parents 1825364 + 79635c7 commit 5ca1e38

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,8 @@ jobs:
367367
& dotnet tool install --global --version ${{ steps.gitversion.outputs.semVer }} --add-source NuGet/ uno.check
368368
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --manifest ${{ matrix.manifest }}
369369
370-
371-
publish:
372-
name: Publish
370+
sign:
371+
name: Sign Package
373372
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
374373
runs-on: windows-latest
375374
needs:
@@ -398,6 +397,48 @@ jobs:
398397
run: |
399398
build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.UNO_PLATFORM_CODESIGN_USERNAME }}" -s "${{ secrets.UNO_PLATFORM_CODESIGN_SECRET }}" -n "Uno.Check" -d "Uno.Check" -u "https://github.com/unoplatform/uno.check"
400399
400+
- name: Upload Signed Artifacts
401+
uses: actions/upload-artifact@v2
402+
with:
403+
name: NuGet
404+
path: .\artifacts
405+
406+
publish_dev:
407+
name: Publish Dev
408+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
409+
runs-on: windows-latest
410+
411+
needs:
412+
- sign
413+
414+
steps:
415+
- name: Download Artifacts
416+
uses: actions/download-artifact@v2
417+
with:
418+
name: NuGet
419+
path: artifacts
420+
421+
- name: NuGet Push
422+
shell: pwsh
423+
run: |
424+
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}"
425+
426+
publish_prod:
427+
name: Publish Production
428+
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
429+
runs-on: windows-latest
430+
environment: Production
431+
432+
needs:
433+
- sign
434+
435+
steps:
436+
- name: Download Artifacts
437+
uses: actions/download-artifact@v2
438+
with:
439+
name: NuGet
440+
path: artifacts
441+
401442
- name: NuGet Push
402443
shell: pwsh
403444
run: |

0 commit comments

Comments
 (0)