From 33ea498b854be8c07ff3b0d85e8b78827c3c5876 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 5 Dec 2023 18:55:19 +0100 Subject: [PATCH] setup pipeline for nuget Signed-off-by: Kevin --- .github/workflows/publish-nuget.yaml | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/publish-nuget.yaml diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml new file mode 100644 index 00000000..b3512387 --- /dev/null +++ b/.github/workflows/publish-nuget.yaml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: + - setup-cicd-pipeline + pull_request: + branches: + - setup-cicd-pipeline + +jobs: + build: + + env: + BUILD_CONFIG: 'Release' + SOLUTION: 'Hyperledger.Aries.sln' + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v1.0.5 + + - name: Restore dependencies + run: nuget restore $SOLUTION + + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 3.1.x + + - name: Build + run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore + + #- name: Run tests + #run: dotnet test /p:Configuration=$env:BUILD_CONFIG --no-restore --no-build --verbosity normal + + - name: Publish + run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} \ No newline at end of file