From 4f4f98f907e46d1f616b0c27d98908662be85868 Mon Sep 17 00:00:00 2001 From: Manfred Lange Date: Sat, 23 Sep 2023 20:56:03 +0000 Subject: [PATCH] use upload/download artifact --- .github/workflows/ci.yml | 16 ++++++++++++++-- .vscode/settings.json | 3 ++- Directory.Build.props | 2 +- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25ebe2d..18e0f09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: # run: dotnet test --configuration Release --no-restore --no-build --verbosity normal - name: Create NuGet package - id: publish + id: create-package run: | dotnet pack --configuration Release --no-build --no-restore NUPKG_PATH=$(find . -name '*.nupkg' -type f -execdir readlink -f {} \;) @@ -59,10 +59,16 @@ jobs: - name: print env variable id: print-env env: - NUGET_PACKAGE_PATH: ${{ steps.publish.outputs.NUGET_PACKAGE_PATH }} + NUGET_PACKAGE_PATH: ${{ steps.create-package.outputs.NUGET_PACKAGE_PATH }} run: | echo "NUGET_PACKAGE_PATH=$NUGET_PACKAGE_PATH" + - name: upload artifact + uses: actions/upload-artifact@v3 + with: + name: nuget-package + path: ${{ steps.create-package.outputs.NUGET_PACKAGE_PATH }} + deploy: needs: - changes @@ -71,6 +77,12 @@ jobs: if: ${{ needs.changes.outputs.version-changed == 'true' }} # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.event.head_commit.modified || contains('Directory.Build.props') }} steps: + - name: download artifact + uses: actions/download-artifact@v3 + with: + name: nuget-package + path: ${{ github.workspace }} + - name: Publish NuGet package env: NUGET_PACKAGE_PATH: ${{ needs.build-and-test.outputs.nuget-package-path }} diff --git a/.vscode/settings.json b/.vscode/settings.json index 9a92fff..f51248e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "editor.indentSize": "tabSize", "github-actions.workflows.pinned.refresh.enabled": true, "github-actions.workflows.pinned.workflows": [ - "ci.yml" + "ci.yml", + ".github/workflows/ci.yml" ], } diff --git a/Directory.Build.props b/Directory.Build.props index fa3c406..772f3e3 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,6 +2,6 @@ incrementing the minor version will do. [Manfred, 19sep2023] --> - 1.11.99 + 1.11.98