Skip to content

Commit

Permalink
Merge pull request #55 from unoplatform/mergify/bp/release/stable/2.4…
Browse files Browse the repository at this point in the history
…/pr-52

ci: Fix artifact handling for GitHub Actions v4 (backport #52)
  • Loading branch information
agneszitte authored Sep 13, 2024
2 parents b3268b6 + 52036d9 commit 8e27c70
Showing 1 changed file with 51 additions and 31 deletions.
82 changes: 51 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand All @@ -51,16 +51,16 @@ jobs:
rm *.cs
dotnet build -c Release
cp bin\Release\netstandard2.0\uno.fonts.fluent.dll ../Fluent
- name: Pack
run: |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
build/nuget.exe pack nuget/Fluent/Uno.Fonts.Fluent.nuspec -Version $adjustedPackageVersion -OutputDirectory ./artifacts
- name: Upload Artifacts
- name: Upload Fluent Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet
name: NuGet-Fluent
path: ./artifacts

build_roboto:
Expand All @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -108,10 +108,10 @@ jobs:
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
msbuild nuget\Roboto\Uno.Fonts.Roboto\Uno.Fonts.Roboto.csproj -t:pack -p:Configuration=Release -p:PackageVersion=$adjustedPackageVersion -p:PackageOutputPath=artifacts
- name: Upload Artifacts
- name: Upload Roboto Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet
name: NuGet-Roboto
path: nuget\Roboto\Uno.Fonts.Roboto\artifacts

build_opensans:
Expand All @@ -124,7 +124,7 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand All @@ -147,10 +147,10 @@ jobs:
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
dotnet pack nuget\OpenSans\Uno.Fonts.OpenSans\Uno.Fonts.OpenSans.csproj -c Release -p:PackageVersion=$adjustedPackageVersion -p:PackageOutputPath=artifacts
- name: Upload Artifacts
- name: Upload OpenSans Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet
name: NuGet-OpenSans
path: nuget\OpenSans\Uno.Fonts.OpenSans\artifacts

publish:
Expand All @@ -160,19 +160,20 @@ jobs:
runs-on: windows-latest
needs: [build_fluent, build_roboto, build_opensans]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: NuGet
path: artifacts
- name: Download Fluent Artifacts # Adjusted to download specific artifact
uses: actions/download-artifact@v4
with:
name: NuGet-Fluent
path: artifacts/fluent

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Download Roboto Artifacts # Adjusted to download specific artifact
uses: actions/download-artifact@v4
with:
name: NuGet-Roboto
path: artifacts/roboto

- name: Setup SignClient
run: |
Expand All @@ -182,13 +183,32 @@ 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 Artifacts
uses: actions/upload-artifact@v4
with:
name: NuGet-Signed
path: ./artifacts
- name: Download OpenSans Artifacts # Adjusted to download specific artifact
uses: actions/download-artifact@v4
with:
name: NuGet-OpenSans
path: artifacts/opensans

- 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 }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
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.Check" -d "Uno.Check" -u "https://github.com/unoplatform/uno.check"
- name: Upload Signed Artifacts
uses: actions/upload-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 }}

0 comments on commit 8e27c70

Please sign in to comment.