forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Build nuget packages in CI and push to nuget.org #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
knocte
merged 13 commits into
nblockchain:main
from
webwarrior-ws:fix-linux-maui-94-mali
Nov 25, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
72971bd
Build and upload nuget packages
webwarrior-ws 8405fd2
Generate stable release package for tags
webwarrior-ws ea38328
Directory.Build.Override.props: include GTK
webwarrior-ws 709a1a3
eng: update package versions
webwarrior-ws 288e810
Directory.Build.props: treat NU1605 not as error
webwarrior-ws 7e7ccf7
GithubCI: don't use Microsoft.Maui/Gtk.slnf
webwarrior-ws 354d932
GithubCI: rename packages to Mali.*
webwarrior-ws 363e1c3
GithubCI: publish Graphics package
webwarrior-ws 7822290
Get pre-release version using nugetPreRelease.fsx
webwarrior-ws d62b2c7
GithubCI: temporarily allow publish from non-main branch
webwarrior-ws 82b2f1a
GithubCI: only publish from main branch
webwarrior-ws 0fe54f6
GIthubCI: extract installing GTK workload script
webwarrior-ws eae8bf7
GithubCI: remove dotnet-format job
webwarrior-ws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build Controls.Sample.Gtk | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_and_test: | ||
name: Build & Test | ||
runs-on: ubuntu-22.04 | ||
env: | ||
GtkSharpVersion: 3.24.24.117-develop | ||
GtkSharpManifestVersion: 8.0.200 | ||
DotnetVersion: 8.0.200 | ||
PROJECTS_TO_PACK: | | ||
src/BlazorWebView/src/Maui/Microsoft.AspNetCore.Components.WebView.Maui.csproj | ||
src/Essentials/src/Essentials.csproj | ||
src/Controls/src/Core/Controls.Core.csproj | ||
src/Controls/src/Xaml/Controls.Xaml.csproj | ||
src/Core/src/Core.csproj | ||
src/Compatibility/Core/src/Compatibility.csproj | ||
src/Controls/Foldable/src/Controls.Foldable.csproj | ||
src/Graphics/src/Graphics/Graphics.csproj | ||
steps: | ||
- name: Checkout MAUI repo | ||
uses: actions/checkout@v2 | ||
- name: Setup .NET SDK ${{ env.DotnetVersion }} | ||
uses: actions/setup-dotnet@v1.7.2 | ||
with: | ||
dotnet-version: ${{ env.DotnetVersion }} | ||
- name: Install gtk workload | ||
run: ./install_gtk_workload.sh | ||
- name: Generate pre-release version suffix | ||
run: dotnet fsi nugetPreRelease.fsx "" > PreReleaseVersionSuffix.txt | ||
- name: Build MAUI | ||
run: | | ||
mv Directory.Build.Override.props.in Directory.Build.Override.props | ||
dotnet build Microsoft.Maui.BuildTasks.slnf | ||
echo "$PROJECTS_TO_PACK" | while read -r project; do | ||
[ -z "$project" ] && continue # Skip if empty | ||
dotnet build -c Release "$project" | ||
done | ||
- name: Pack MAUI | ||
run: ./pack_mali.sh | ||
- name: Upload binaries to nuget (if tag or main branch, and nugetKey is present) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NUGET_KEY: ${{ secrets.NUGET_KEY }} | ||
if: ${{ env.NUGET_KEY != '' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }} | ||
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
# 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 | ||
dotnet nuget add source --name nuget.org "https://api.nuget.org/v3/index.json" | ||
wget https://www.nuget.org/api/v2/package/gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion/$GtkSharpVersion -O gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg | ||
DOTNET_DIR=/home/runner/.dotnet | ||
WORKLOAD_MANIFEST_DIR=$DOTNET_DIR/sdk-manifests/$DotnetVersion/gtksharp.net.sdk.gtk | ||
mkdir -p $WORKLOAD_MANIFEST_DIR | ||
unzip -j gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg "data/*" -d $WORKLOAD_MANIFEST_DIR/ | ||
rm gtksharp.net.sdk.gtk.manifest-$GtkSharpManifestVersion.nupkg | ||
chmod 764 $WORKLOAD_MANIFEST_DIR/* | ||
dotnet workload search | ||
dotnet workload install gtk --skip-manifest-update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#r "nuget: Fsdk, Version=0.6.0--date20231213-0703.git-d7a5962" | ||
|
||
let args = fsi.CommandLineArgs | ||
|
||
Fsdk.Network.GetNugetPrereleaseVersionFromBaseVersion args.[1] | ||
|> System.Console.WriteLine |
This file contains hidden or bidirectional Unicode text that may be in
10000
terpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/env bash | ||
|
||
# Use PROJECTS_TO_PACK env. var for newline-separated list of projects. | ||
|
||
set -euxo pipefail | ||
|
||
|
||
echo "$PROJECTS_TO_PACK" | while read -r project; do | ||
[ -z "$project" ] && continue # Skip if empty | ||
dotnet pack "$project" --no-build --no-restore | ||
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Mali.Core.targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<Project> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)..\Mali.Core.targets" /> | ||
|
||
</Project> |
5 changes: 0 additions & 5 deletions
5
src/Core/src/nuget/buildTransitive/net6.0-windows10.0.17763.0/Microsoft.Maui.Core.targets
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.