Skip to content

Bump NJsonSchema from 11.0.0 to 11.0.1 #183

Bump NJsonSchema from 11.0.0 to 11.0.1

Bump NJsonSchema from 11.0.0 to 11.0.1 #183

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: #This workflow is only triggered when commits are pushed. Pushing tags won't trigger it.
- '**'
pull_request:
release:
types:
- published
env:
PACKAGE_NAME: OpenApiLINQPadDriver
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: 1
SLN: OpenApiLINQPadDriver.sln
CONFIGURATION: Release
RETENTION_DAYS: 1
NUGET_OUTPUT_DIRECTORY: ${{ github.workspace }}/nuget
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name : Restore Cache
id: cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore ${{ env.SLN }} --locked-mode
- name: ${{ env.SLN }} ${{ env.CONFIGURATION }} Build
run: dotnet build ${{ env.SLN }} --no-restore --configuration ${{ env.CONFIGURATION }} -p:GITHUB_ACTIONS=true
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}
if-no-files-found: error
path: |
${{ env.PACKAGE_NAME }}/bin/${{ env.CONFIGURATION }}/${{ env.PACKAGE_NAME }}.*.*nupkg
retention-days: ${{ env.RETENTION_DAYS }}
deploy:
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}
path: ${{ env.NUGET_OUTPUT_DIRECTORY }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Publish NuGet package
run: |
for packageFile in "${{ env.NUGET_OUTPUT_DIRECTORY }}"/"${{ env.PACKAGE_NAME }}"*.nupkg
do
if [ -f "$packageFile" ]; then
dotnet nuget push "$packageFile" --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
fi
done