Skip to content

Merge pull request #42 from ovpoddar/main #49

Merge pull request #42 from ovpoddar/main

Merge pull request #42 from ovpoddar/main #49

name: Build, Test and Publish
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.400
source-url: https://nuget.pkg.github.com/lucassklp/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: dotnet restore
- name: Build
run: |
cd Desktop.Robot
dotnet build --configuration Release --no-restore
- name: Pack
run: |
cd Desktop.Robot
dotnet pack -c Release -o out
- name: Push Desktop.Robot to GitHub registry
run: |
dotnet nuget sources add -name "GPR" -Source https://nuget.pkg.github.com/lucassklp/index.json -Username lucassklp -Password ${{ secrets.GITHUB_TOKEN }}
dotnet nuget push ./Desktop.Robot/out/*.nupkg --skip-duplicate
- name: Publish Desktop.Robot to nuget.org
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: Desktop.Robot/Desktop.Robot.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}