-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added CI/CD for the plugin for ease of release (#10)
* fix: added ci for biometric plugin * fix: added cd for biometric plugin * fix: updated ci for path issue * fix: added the correct path for CD * fix: added path fixes for cd * Update main_cd.yml
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,29 @@ | ||
name: Create a release on NuGet | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" | ||
jobs: | ||
release-nuget: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Verify commit exists in origin/main | ||
run: | | ||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | ||
git branch --remote --contains | grep origin/master | ||
- name: Get version information from tag | ||
id: get_version | ||
run: | | ||
$version="${{github.ref_name}}".TrimStart("v") | ||
"version-without-v=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append | ||
- name: Pack | ||
run: dotnet pack Plugin.Maui.Biometric\Plugin.Maui.Biometric.sln -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }} | ||
- name: Push | ||
run: dotnet nuget push Plugin.Maui.Biometric\Plugin.Maui.Biometric\bin\Release\Plugin.Maui.Biometric.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }} |
This file contains 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,19 @@ | ||
name: Build for CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
paths-ignore: | ||
- "**.md" | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build-plugin-ci: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: dotnet build Plugin.Maui.Biometric\Plugin.Maui.Biometric.sln -c Release |