-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
22 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 |
---|---|---|
|
@@ -3,44 +3,31 @@ name: Publish Nuget | |
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
publish: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
dotnet-version: '7.0.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
|
||
|
||
- name: List Files | ||
run: ls -la GoogleMapsApi | ||
- name: Pack | ||
run: dotnet pack --configuration Release --no-build --output . | ||
|
||
- name: Publish NuGet | ||
# You may pin to the exact commit or the version. | ||
# uses: brandedoutcast/publish-nuget@c12b8546b67672ee38ac87bea491ac94a587f7cc | ||
uses: brandedoutcast/[email protected] | ||
with: | ||
# Filepath of the project to be packaged, relative to root of repository | ||
PROJECT_FILE_PATH: GoogleMapsApi/GoogleMapsApi.csproj | ||
# NuGet package id, used for version detection & defaults to project name | ||
PACKAGE_NAME: GoogleMapsApi | ||
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH | ||
#VERSION_FILE_PATH: # optional | ||
#VERSION_REGEX: # optional, default is ^\s*<Version>(.*)<\/Version>\s*$ | ||
#VERSION_STATIC: 1.0.1 #Taken from Project File. | ||
NUGET_KEY: ${{secrets.NUGET_API_KEY}} | ||
# NuGet server uri hosting the packages, defaults to https://api.nuget.org | ||
#NUGET_SOURCE: # optional, default is https://api.nuget.org | ||
|
||
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |