Skip to content

Commit

Permalink
Add GitHub to NuGet release workflow (#67)
Browse files Browse the repository at this point in the history
* Add publish yml

* Change solution path in publish.yml

* Add default workdor to publish.yml

* Remove no-restore switch from build step.

* Set build config manually

* Set master as publish branch and finalize nuget push command.
  • Loading branch information
tusmester authored Mar 22, 2023
1 parent bd4aea9 commit 394d0b7
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish to NuGet
on:
push:
branches:
- master

jobs:

build:

runs-on: windows-latest
defaults:
run:
working-directory: src

env:
BUILD_CONFIG: 'Release'
SOLUTION: 'SenseNet.Tools.sln'

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build $SOLUTION --configuration Release --no-restore
- name: Pack nugets
run: dotnet pack $SOLUTION -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json




0 comments on commit 394d0b7

Please sign in to comment.