From 4f6a5b6dc37c88e37da204e95b0bd8d985a2355a Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Thu, 1 Aug 2024 12:02:26 +0300 Subject: [PATCH 1/4] Create dotnet.yml --- .github/workflows/dotnet.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..dadc9b9 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -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\org.ohdsi.cdm.framework.csproj + - 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 }} From e8e82897ad11d16801a5e9658d6791a0dba362ad Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Thu, 1 Aug 2024 12:13:59 +0300 Subject: [PATCH 2/4] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index dadc9b9..bdbee0d 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,7 +17,7 @@ jobs: with: dotnet-version: 8.0.x - name: Restore dependencies - run: dotnet restore dotnet restore .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj + 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 From e03bfac3cb0f0ba7e99cb7b3b9ffc00012b0505e Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Thu, 1 Aug 2024 12:24:56 +0300 Subject: [PATCH 3/4] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index bdbee0d..0753e7c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,7 +17,7 @@ jobs: with: dotnet-version: 8.0.x - name: Restore dependencies - run: dotnet restore dotnet restore sources/Framework/org.ohdsi.cdm.framework + run: dotnet restore .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj - name: Build run: dotnet build -c Release .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj - name: Test From 245ee74f43b780d0922e91690a84a772519b91fe Mon Sep 17 00:00:00 2001 From: Anton Ivanov Date: Thu, 1 Aug 2024 12:32:45 +0300 Subject: [PATCH 4/4] Update dotnet.yml --- .github/workflows/dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0753e7c..cc62927 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -17,14 +17,14 @@ jobs: with: dotnet-version: 8.0.x - name: Restore dependencies - run: dotnet restore .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj + run: dotnet restore sources/Framework/org.ohdsi.cdm.framework/org.ohdsi.cdm.framework.csproj - name: Build - run: dotnet build -c Release .\sources\Framework\org.ohdsi.cdm.framework\org.ohdsi.cdm.framework.csproj + 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 + 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 + 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 }}