Skip to content

Commit

Permalink
Merge pull request #141 from unoplatform/dev/jela/adjust-environment
Browse files Browse the repository at this point in the history
ci: Add environment for nuget publish
  • Loading branch information
jeromelaban authored Mar 21, 2023
2 parents 1825364 + 79635c7 commit 5ca1e38
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,8 @@ jobs:
& dotnet tool install --global --version ${{ steps.gitversion.outputs.semVer }} --add-source NuGet/ uno.check
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --manifest ${{ matrix.manifest }}

publish:
name: Publish
sign:
name: Sign Package
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
runs-on: windows-latest
needs:
Expand Down Expand Up @@ -398,6 +397,48 @@ jobs:
run: |
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"
- name: Upload Signed Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet
path: .\artifacts

publish_dev:
name: Publish Dev
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: windows-latest

needs:
- sign

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: NuGet
path: artifacts

- name: NuGet Push
shell: pwsh
run: |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}"
publish_prod:
name: Publish Production
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
runs-on: windows-latest
environment: Production

needs:
- sign

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: NuGet
path: artifacts

- name: NuGet Push
shell: pwsh
run: |
Expand Down

0 comments on commit 5ca1e38

Please sign in to comment.