-
Notifications
You must be signed in to change notification settings - Fork 0
Finalization of package for first release #4
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
Changes from 6 commits
108c425
420ba95
aadfeb9
b4b4ccc
051e1cb
18129a3
916b61c
597ff6a
fcf0d5a
afeaa56
82cb84d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Build | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| env: | ||
| SOLUTION_PATH: src/Maui.CredentialManagers.slnx | ||
| DOTNET_VERSION: '10.0.x' | ||
| BUILD_CONFIGURATION: Release | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup .NET | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
|
||
| - name: Install MAUI workload | ||
| run: dotnet workload install maui | ||
|
|
||
| - name: Restore dependencies | ||
| run: dotnet restore ${{ env.SOLUTION_PATH }} | ||
|
|
||
| - name: Build | ||
| run: dotnet build ${{ env.SOLUTION_PATH }} --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} | ||
|
|
||
| - name: Test with coverage | ||
| run: dotnet test ${{ env.SOLUTION_PATH }} --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --collect:"XPlat Code Coverage" --results-directory ./coverage | ||
|
|
||
| - name: Find coverage file | ||
| id: coverage | ||
| run: echo "file=$(find ./coverage -name 'coverage.cobertura.xml' | head -1)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Upload coverage to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| files: ${{ steps.coverage.outputs.file }} | ||
| fail_ci_if_error: false | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,72 @@ | ||||||
| name: Publish to NuGet | ||||||
|
|
||||||
| on: | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| env: | ||||||
| PROJECT_PATH: src/Maui.CredentialManagers/Maui.CredentialManagers.csproj | ||||||
| SOLUTION_PATH: src/Maui.CredentialManagers.slnx | ||||||
| PACKAGE_NAME: Kebechet.Maui.CredentialManagers | ||||||
| DOTNET_VERSION: '10.0.x' | ||||||
| BUILD_CONFIGURATION: Release | ||||||
| OUTPUT_PATH: ./nupkg | ||||||
| NUGET_SOURCE: https://api.nuget.org/v3/index.json | ||||||
|
|
||||||
| jobs: | ||||||
| publish: | ||||||
| runs-on: macos-latest | ||||||
| permissions: | ||||||
| contents: write | ||||||
| packages: write | ||||||
|
|
||||||
| steps: | ||||||
| - uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Setup .NET | ||||||
| uses: actions/setup-dotnet@v4 | ||||||
| with: | ||||||
| dotnet-version: ${{ env.DOTNET_VERSION }} | ||||||
|
|
||||||
| - name: Install MAUI workload | ||||||
| run: dotnet workload install maui | ||||||
|
|
||||||
| - name: Get version from csproj | ||||||
| id: version | ||||||
| run: | | ||||||
| VERSION=$(grep -oP '(?<=<Version>)[^<]+' ${{ env.PROJECT_PATH }}) | ||||||
|
||||||
| VERSION=$(grep -oP '(?<=<Version>)[^<]+' ${{ env.PROJECT_PATH }}) | |
| VERSION=$(dotnet msbuild ${{ env.PROJECT_PATH }} -nologo -getProperty:Version | tr -d '[:space:]') |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -399,3 +399,6 @@ FodyWeavers.xsd | |
|
|
||
| # Visual Studio for Mac | ||
| **/.DS_Store | ||
|
|
||
| # Claude Code | ||
| **/.claude/settings.local.json | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1 +1,67 @@ | ||||||||||||||||||||||
| # Maui.CredentialManagers | ||||||||||||||||||||||
| [](https://www.buymeacoffee.com/kebechet) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Maui.CredentialManagers | ||||||||||||||||||||||
| [](https://www.nuget.org/packages/Kebechet.Maui.CredentialManagers/) | ||||||||||||||||||||||
| [](https://www.nuget.org/packages/Kebechet.Maui.CredentialManagers/) | ||||||||||||||||||||||
| [](https://github.com/Kebechet/Maui.CredentialManagers/actions/workflows/build.yml) | ||||||||||||||||||||||
| [](https://codecov.io/gh/Kebechet/Maui.CredentialManagers) | ||||||||||||||||||||||
|  | ||||||||||||||||||||||
| [](https://x.com/samuel_sidor) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Cross-platform .NET MAUI library for unified credential management on Android and iOS. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Installation | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```bash | ||||||||||||||||||||||
| dotnet add package Kebechet.Maui.CredentialManagers | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Usage | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Registration | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```csharp | ||||||||||||||||||||||
| builder.Services.AddCredentialManagerService(options => | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| options.GoogleServerClientId = "xxx.apps.googleusercontent.com"; | ||||||||||||||||||||||
| options.GoogleIosClientId = "yyy.apps.googleusercontent.com"; | ||||||||||||||||||||||
| options.GoogleIosRedirectUri = "com.myapp:/oauth2redirect"; | ||||||||||||||||||||||
| options.AppleServiceId = "com.myapp.auth"; | ||||||||||||||||||||||
| options.AppleRedirectUri = "https://myserver.com/auth/apple/callback"; | ||||||||||||||||||||||
| options.AppleAndroidCallbackScheme = "com.myapp:/applecallback"; | ||||||||||||||||||||||
|
||||||||||||||||||||||
| options.GoogleIosClientId = "yyy.apps.googleusercontent.com"; | |
| options.GoogleIosRedirectUri = "com.myapp:/oauth2redirect"; | |
| options.AppleServiceId = "com.myapp.auth"; | |
| options.AppleRedirectUri = "https://myserver.com/auth/apple/callback"; | |
| options.AppleAndroidCallbackScheme = "com.myapp:/applecallback"; | |
| options.Ios.GoogleClientId = "yyy.apps.googleusercontent.com"; | |
| options.Ios.GoogleRedirectUri = "com.myapp:/oauth2redirect"; | |
| options.Apple.ServiceId = "com.myapp.auth"; | |
| options.Apple.RedirectUri = "https://myserver.com/auth/apple/callback"; | |
| options.Android.AppleCallbackScheme = "com.myapp:/applecallback"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Solution> | ||
| <Project Path="../src/Maui.CredentialManagers/Maui.CredentialManagers.csproj" /> | ||
| <Project Path="DemoApp/DemoApp.csproj"> | ||
| <Deploy /> | ||
| </Project> | ||
| </Solution> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
| xmlns:local="clr-namespace:DemoApp" | ||
| x:Class="DemoApp.App"> | ||
| <Application.Resources> | ||
| <ResourceDictionary> | ||
|
|
||
| <!-- | ||
| For information about styling .NET MAUI pages | ||
| please refer to the documentation: | ||
| https://go.microsoft.com/fwlink/?linkid=2282329 | ||
| --> | ||
|
|
||
| </ResourceDictionary> | ||
| </Application.Resources> | ||
| </Application> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| namespace DemoApp; | ||
|
|
||
| public partial class App : Application | ||
| { | ||
| public App() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| protected override Window CreateWindow(IActivationState? activationState) | ||
| { | ||
| return new Window(new MainPage()) { Title = "DemoApp" }; | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| @inherits LayoutComponentBase | ||
|
|
||
| <main> | ||
| <article class="content px-4"> | ||
| @Body | ||
| </article> | ||
| </main> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow runs
dotnet testonsrc/Maui.CredentialManagers.slnx, but that solution currently only contains the library project (no test project / Microsoft.NET.Test.Sdk).dotnet testwill fail or produce no coverage in this setup. Either add a proper test project to the solution, or remove the test/coverage steps (and Codecov upload) to keep CI green.