From a6393d43f26c4a2318d1e56fa9646e0f477b2a24 Mon Sep 17 00:00:00 2001 From: Sebastien Ros Date: Sun, 18 Dec 2022 10:59:25 -0800 Subject: [PATCH] Publish previews on myget --- .github/workflows/build.yml | 12 ++++----- .github/workflows/pr.yml | 26 +++++++++++++++++++ Fluid.sln | 1 + .../MinimalApis.LiquidViews.csproj | 2 +- README.md | 1 + 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7873ee0c..a79402ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,12 +7,6 @@ on: - 'doc/**' - 'readme.md' - pull_request: - branches: [ main ] - paths-ignore: - - 'doc/**' - - 'readme.md' - jobs: build: @@ -29,3 +23,9 @@ jobs: - name: Test - Compiled run: dotnet test --configuration Release /p:Compiled=true + + - name: Pack + run: dotnet pack --output artifacts --configuration Release -p:PackageVersion=$GITHUB_RUN_NUMBER + + - name: Publish on MyGet + run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/fluid/api/v2/package diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..b71cd333 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,26 @@ +name: PR Checks + +on: + + pull_request: + branches: [ main ] + paths-ignore: + - 'doc/**' + - 'readme.md' + +jobs: + build: + + runs-on: ubuntu-latest + env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + + steps: + - uses: actions/checkout@v3 + + - name: Test + run: dotnet test -c Release + + - name: Test - Compiled + run: dotnet test --configuration Release /p:Compiled=true diff --git a/Fluid.sln b/Fluid.sln index 0bed0a11..6d1b5eda 100644 --- a/Fluid.sln +++ b/Fluid.sln @@ -19,6 +19,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{BE5EF08E Common.props = Common.props CREDITS.md = CREDITS.md NuGet.config = NuGet.config + .github\workflows\pr.yml = .github\workflows\pr.yml .github\workflows\publish.yml = .github\workflows\publish.yml README.md = README.md EndProjectSection diff --git a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj index 0e89d615..72553e9f 100644 --- a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj +++ b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj @@ -1,7 +1,7 @@  - net7.0 + net7.0 9 true logo_64x64.png diff --git a/README.md b/README.md index bf1501b5..2f118edf 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![NuGet](https://img.shields.io/nuget/v/Fluid.Core.svg)](https://nuget.org/packages/Fluid.Core) [![MIT](https://img.shields.io/github/license/sebastienros/fluid)](https://github.com/sebastienros/fluid/blob/main/LICENSE) +[![MyGet](https://img.shields.io/myget/fluid/vpre/fluid.core.svg?label=MyGet)](https://www.myget.org/feed/fluid/package/nuget/fluid.core) ## Basic Overview