Skip to content

Commit

Permalink
Merge pull request #2 from unoplatform/dev/jela/ci
Browse files Browse the repository at this point in the history
chore: Adjust signing, publishing
  • Loading branch information
jeromelaban authored Dec 5, 2024
2 parents 5c6df1c + 3ec1318 commit c7ef36d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 22 deletions.
58 changes: 50 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
name: NuGet
path: .\artifacts

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 All @@ -52,7 +52,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: NuGet
path: artifacts
path: artifacts\NuGet

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
Expand All @@ -64,12 +64,54 @@ jobs:
dotnet tool install --tool-path build SignClient
- name: SignClient
shell: pwsh
run: |
build\SignClient sign -i artifacts\NuGet\*.nupkg -c build\SignClient.json -r "${{ secrets.UNO_PLATFORM_CODESIGN_USERNAME }}" -s "${{ secrets.UNO_PLATFORM_CODESIGN_SECRET }}" -n "Uno.Devtools.Telemetry" -d "Uno.Devtools.Telemetry" -u "https://github.com/unoplatform/uno.check"
- name: Upload Signed Artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet-Signed
path: .\artifacts\NuGet

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

needs:
- sign

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

- name: NuGet Push
shell: pwsh
run: |
if ("${{ secrets.SIGN_CLIENT_USER }}" -ne "")
{
build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.SIGN_CLIENT_USER }}" -s "${{ secrets.SIGN_CLIENT_SECRET }}" -n "Uno.Devtools.Telemetry" -d "Uno.Devtools.Telemetry" -u "https://github.com/unoplatform/uno.devtools.telemetry"
}
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@v4
with:
name: NuGet-Signed
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 }}
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}"
14 changes: 0 additions & 14 deletions .github/workflows/labeler.yml

This file was deleted.

0 comments on commit c7ef36d

Please sign in to comment.