Skip to content

Commit

Permalink
fixing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
thudugala committed Jun 5, 2024
1 parent e5acf43 commit 76c577c
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nuget Build
name: Nuget Build

on: [push]

Expand All @@ -9,42 +9,31 @@
steps:
- uses: actions/checkout@v3

- name: Setup NuGet
uses: NuGet/setup-nuget@v1.2.0

- name: Setup .NET 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x

- uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'

- name: Install MAUI Workloads
run: |
dotnet workload install android --ignore-failed-sources
dotnet workload install ios --ignore-failed-sources
dotnet workload install maui --ignore-failed-sources
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1

- name: Add private GitHub registry to NuGet
run: nuget sources add -name "GitHub" -source "https://nuget.pkg.github.com/thudugala/index.json" -userName thudugala -password ${{ secrets.Elvin_Package_Registry }}
run: dotnet nuget add source "https://nuget.pkg.github.com/thudugala/index.json" --name "GitHub" --userName thudugala --password ${{ secrets.Elvin_Package_Registry }}

- name : restore Plugin.LocalNotification.sln
run: nuget restore Source/Plugin.LocalNotification.sln
run: dotnet restore Source/Plugin.LocalNotification.sln

- name: build Plugin.LocalNotification.csproj
run: msbuild Source/Plugin.LocalNotification/Plugin.LocalNotification.csproj /verbosity:normal /t:Rebuild /p:Configuration=Debug
run: dotnet build Source/Plugin.LocalNotification/Plugin.LocalNotification.csproj -c Release

- uses: actions/upload-artifact@v3.1.0
with:
name: Plugin.LocalNotification
path: Source/Plugin.LocalNotification/bin/Debug/
path: Source/Plugin.LocalNotification/bin/Release/

- name: Push generated package to GitHub registry
run: nuget push **/*.nupkg -Source "GitHub" -SkipDuplicate
run: dotnet nuget push "**/*.nupkg" --source "GitHub" --skip-duplicate

0 comments on commit 76c577c

Please sign in to comment.