Skip to content

Merge pull request #154 from DedAnton/bug-153 #55

Merge pull request #154 from DedAnton/bug-153

Merge pull request #154 from DedAnton/bug-153 #55

name: Build and publish
on:
push:
branches: [ "master" ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal --configuration Release
- name: Publish package to nuget
uses: ./.github/workflows/publish_nuget_package
with:
PROJECT_FILE_PATH: NextGenMapper/NextGenMapper.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
NUGET_SOURCE: https://api.nuget.org/v3/index.json
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
- name: Publish package to github
uses: ./.github/workflows/publish_nuget_package
with:
PROJECT_FILE_PATH: NextGenMapper/NextGenMapper.csproj
NUGET_KEY: ${{secrets.GH_API_KEY}}
NUGET_SOURCE: https://nuget.pkg.github.com/DedAnton/index.json
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$