Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release to nuget #97

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release to NuGet
on:
workflow_dispatch:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore dotnet restore sources/Framework/org.ohdsi.cdm.framework
- name: Build
run: dotnet build -c Release .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj
- name: Test
run: dotnet test -c Release --no-build .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj
- name: Create NuGet Package
run: >
dotnet pack -c Release --no-build .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj
-o output
-p:AssemblyVersion=${{ steps.gitversion.outputs.major }}.0.0.0
-p:FileVersion=${{ steps.gitversion.outputs.version }}.${{ github.run_number }}
-p:InformationalVersion=${{ steps.gitversion.outputs.version }}
-p:PackageVersion=${{ steps.gitversion.outputs.version }}
- name: Display Output
run: dir output
- name: Push to NuGet
run: dotnet nuget push output/org.ohdsi.cdm.framework.${{ steps.gitversion.outputs.version }}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.LAMBDABUILDER }}
Loading