Skip to content

Merge pull request #376 from notion-dotnet/358-support-passing-query-… #142

Merge pull request #376 from notion-dotnet/358-support-passing-query-…

Merge pull request #376 from notion-dotnet/358-support-passing-query-… #142

name: Build artifacts
# ==== NOTE: do not rename this yml file or the run_number will be reset ====
on:
push:
branches: [main]
workflow_dispatch:
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
source-url: https://nuget.pkg.github.com/notion-dotnet/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
run: |
dotnet restore
- name: Build solution [Release]
run: dotnet build --no-restore -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER
- name: Pack solution [Release]
run: |
dotnet pack --no-restore --no-build -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER -p:PackageReadmeFile=README.md -o PackOutputs
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Nuget packages
path: |
PackOutputs/*
- name: Publish Nuget packages to GitHub registry
run: dotnet nuget push "PackOutputs/*" -k ${{secrets.GITHUB_TOKEN}}