Skip to content

Commit

Permalink
GithubCI: use nuget source instead of Github
Browse files Browse the repository at this point in the history
Use nuget source instead of Github packages so that there is
no need for authentication anymore.

Update maui submodule to point to CrossMaui/new branch.
  • Loading branch information
parhamsaremi authored and webwarrior-ws committed Dec 12, 2024
1 parent 2ac9c55 commit 20f4604
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,36 +241,32 @@ jobs:
linux-github--dotnet-and-mono:
runs-on: ubuntu-22.04
env:
GtkSharpVersion: 3.24.24.77-develop
DotnetVersion: 6.0.300
GtkSharpVersion: 3.24.24.95
DotnetVersion: 6.0.400
steps:
- uses: actions/checkout@v1
with:
submodules: true
# We also tested using 6.0.111 for both projects
# but MAUI failed to build on this version with this error:
# Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
# so instead we use 6.0.300
- name: Setup .NET SDK ${{ env.DotnetVersion }}
uses: actions/[email protected]
with:
dotnet-version: ${{ env.DotnetVersion }}
- name: Install gtk workload
run: |
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/GtkSharp/index.json"
# For some reason automatic workload manifest detection doesn't work (see https://github.com/GtkSharp/GtkSharp/issues/355#issuecomment-1446262239), so download and uzip mainfest file manually
wget --user ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} https://nuget.pkg.github.com/GtkSharp/download/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}/$GtkSharpVersion/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg
wget -O gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg https://globalcdn.nuget.org/packages/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.$GtkSharpVersion.nupkg
DOTNET_DIR=/home/runner/.dotnet
WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/${{ env.DotnetVersion }}/gtksharp.net.sdk.gtk
mkdir -p $WORKLOAD_MANIFEST_DIR/
unzip -j gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/
rm gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg
# otherwise we get System.UnauthorizedAccessException: Access to the path '/home/runner/.dotnet/sdk-manifests/6.0.300/gtksharp.net.sdk.gtk/WorkloadManifest.json' is denied.
chmod 764 $WORKLOAD_MANIFEST_DIR/*
dotnet workload search
dotnet workload install gtk --skip-manifest-update
- name: Add Maui Nuget source
run: |
cd dependencies/maui
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/GtkSharp/index.json"
dotnet nuget add source --name nuget https://api.nuget.org/v3/index.json
- name: install missing dependencies
run: sudo apt install --yes fsharp nunit-console
- name: check mono version
Expand Down
2 changes: 1 addition & 1 deletion dependencies/maui
Submodule maui updated from 404d6a to bc8eb6

0 comments on commit 20f4604

Please sign in to comment.