Skip to content

Commit

Permalink
Merge pull request #11 from unoplatform/dev/jela/azdo
Browse files Browse the repository at this point in the history
Versioning and publishing
  • Loading branch information
jeromelaban authored May 28, 2024
2 parents 1918156 + 5d11855 commit f9a7f88
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 233 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/labeler.yml

This file was deleted.

88 changes: 84 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ jobs:
name: extensions
path: extensions/azuredevops/artifacts

publish-tools:
name: Publish
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/master')) }}
sign:
name: Sign Packages
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}
runs-on: windows-latest
needs:
- build-extensions
- build-tools
steps:
- name: Checkout
Expand All @@ -139,6 +140,85 @@ jobs:
with:
dotnet-version: '3.1.x'

- name: Setup SignClient
run: |
dotnet tool install --tool-path build SignClient
- name: SignClient
shell: pwsh
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 Nuget Tools" -d "Uno Nuget Tools" -u "https://github.com/unoplatform/nuget.updater"
- name: Upload Signed Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet-Signed
path: .\artifacts

publish_nuget_dev:
name: Publish NuGet 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-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 }}"
publish_nuget_prod:
name: Publish NuGet Production
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
runs-on: windows-latest
environment: 'Nuget Production'

needs:
- sign

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
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 }}"
publish_extensions_prod:
name: Publish Extensions Production
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }}
runs-on: windows-latest
environment: 'Extension Production'

needs:
- build-extensions

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

- name: Publish to VS Marketplace
shell: pwsh
run: |
dotnet tool update -g dotnet-vs
$vsix = Get-ChildItem -Path .\artifacts -Filter *.vsix | Select-Object -First 1
& "$(vs where release --prop=InstallationPath)/VSSDK/VisualStudioIntegration/Tools/Bin/VsixPublisher.exe" publish `
-payload "$vsix" `
-publishManifest "extensions/azuredevops/vss-extension.json" `
-personalAccessToken "$(VS_VSIX_PAT)"
209 changes: 0 additions & 209 deletions LICENSE.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Be mindful of our [Code of Conduct](CODE_OF_CONDUCT.md).

## Acknowledgments

This repository is a fork of nventive's NuGet Updater.
This repository is a fork of [nventive's NuGet Updater](https://github.com/nventive/NuGet.Updater) and [build tools](https://github.com/nventive/nventive-Build-Tools).
13 changes: 13 additions & 0 deletions build/SignClient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "80441c68-7fd8-4866-8dd1-8c78ff585a8a",
"TenantId": "a297d6c0-b635-41a3-b1e3-558efe71e413"
},
"Service": {
"Url": "https://uno-signservice.azurewebsites.net",
"ResourceId": "https://SignService.platformuno.onmicrosoft.com/6dd8824b-6147-4b02-a1af-ea83b0ffebdb"
}
}
}
8 changes: 4 additions & 4 deletions extensions/azuredevops/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
"path": "overview.md"
}
},
"repository": {
"type": "git",
"uri": "https://unoplatform.visualstudio.com/DevOps/_git/Build.Tasks"
},
"repository": {
"type": "git",
"uri": "https://github.com/unoplatform/nuget.updater"
},
"contributions": [
{
"id": "unoplatform.canaryUpdater",
Expand Down
Loading

0 comments on commit f9a7f88

Please sign in to comment.