Skip to content

Commit

Permalink
ci: Fix artifact handling for GitHub Actions v4
Browse files Browse the repository at this point in the history
- Updated artifact upload steps to assign unique names (NuGet-Fluent, NuGet-Roboto, NuGet-OpenSans) to address changes introduced in actions/upload-artifact@v4.
- Modified publish job to download artifacts by job-scoped names into separate directories (artifacts/fluent, artifacts/roboto, artifacts/opensans).
- Adjusted signing and pushing steps to ensure consistent handling of artifacts across jobs and publishing.

(cherry picked from commit 28b88be)

# Conflicts:
#	.github/workflows/ci.yml
  • Loading branch information
agneszitte authored and mergify[bot] committed Sep 13, 2024
1 parent cbb8387 commit e645143
Showing 1 changed file with 69 additions and 17 deletions.
86 changes: 69 additions & 17 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,22 @@ 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
<<<<<<< HEAD

- name: Upload Artifacts
uses: actions/upload-artifact@v2
=======

- name: Upload Fluent Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
>>>>>>> 28b88be (ci: Fix artifact handling for GitHub Actions v4)
with:
name: NuGet
name: NuGet-Fluent
path: ./artifacts

build_roboto:
Expand All @@ -73,7 +79,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 +114,15 @@ 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
<<<<<<< HEAD
- name: Upload Artifacts
uses: actions/upload-artifact@v2
=======
- name: Upload Roboto Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
>>>>>>> 28b88be (ci: Fix artifact handling for GitHub Actions v4)
with:
name: NuGet
name: NuGet-Roboto
path: nuget\Roboto\Uno.Fonts.Roboto\artifacts

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

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
Expand All @@ -147,10 +158,15 @@ 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
<<<<<<< HEAD
- name: Upload Artifacts
uses: actions/upload-artifact@v2
=======
- name: Upload OpenSans Artifacts # Changed to have unique name for artifacts
uses: actions/upload-artifact@v4
>>>>>>> 28b88be (ci: Fix artifact handling for GitHub Actions v4)
with:
name: NuGet
name: NuGet-OpenSans
path: nuget\OpenSans\Uno.Fonts.OpenSans\artifacts

publish:
Expand All @@ -160,20 +176,30 @@ 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

<<<<<<< HEAD
- name: Download Artifacts
uses: actions/download-artifact@v2
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
>>>>>>> 28b88be (ci: Fix artifact handling for GitHub Actions v4)

- 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

<<<<<<< HEAD
- name: Setup SignClient
run: |
dotnet tool install --tool-path build SignClient
Expand All @@ -187,8 +213,34 @@ jobs:
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
>>>>>>> 28b88be (ci: Fix artifact handling for GitHub Actions v4)

- 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 e645143

Please sign in to comment.