Skip to content

Commit ce302ba

Browse files
committed
yml file fix.
1 parent d689484 commit ce302ba

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
push:
66
branches:
77
- master
8-
- develop
98

109
env:
1110
SOLUTION_PATH: './FmgLib.MauiMarkup.sln'
1211
PROJECT_PATH: 'src\FmgLib.MauiMarkup\FmgLib.MauiMarkup.csproj'
1312
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output
13+
NUGET_API_KEY: ${{ secrets.NUGET_AUTH_TOKEN }}
1414

1515
jobs:
1616
deploy:
@@ -34,8 +34,12 @@ jobs:
3434
- name: Build the solution
3535
run: dotnet build ${{ env.SOLUTION_PATH }} -c Release
3636

37-
# - name: 'Restore package'
38-
# run: dotnet restore ${{ env.PROJECT_PATH }}
37+
- name: Pack NuGet package
38+
run: dotnet pack ${{ env.PROJECT_PATH }} -c Release --no-build -o ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
3939

40-
# - name: 'Build project'
41-
# run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release
40+
- name: Push to NuGet
41+
run: |
42+
$nupkgFiles = Get-ChildItem -Path "${{ env.PACKAGE_OUTPUT_DIRECTORY }}" -Filter "*.nupkg"
43+
foreach ($file in $nupkgFiles) {
44+
dotnet nuget push $file.FullName -k ${{ env.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
45+
}

0 commit comments

Comments
 (0)