From a0d20de08a5370459a435e1657d144a98113c161 Mon Sep 17 00:00:00 2001 From: Andrea Ghensi Date: Wed, 29 May 2024 04:36:42 +1000 Subject: [PATCH 1/2] build: push nuget package to github registry --- .github/workflows/main.yml | 6 ++---- Build.proj | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce3b9be8..ae3fcfd5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,13 +22,11 @@ jobs: run: pwsh make.ps1 - name: Package run: pwsh make.ps1 package - - uses: actions/upload-artifact@v2 - with: - name: packages - path: Package/Release/Packages - name: Test (net48) run: ./make.ps1 -frameworks net48 test-all shell: pwsh - name: Test (net6.0) run: ./make.ps1 -frameworks net6.0 test-all shell: pwsh + - name: Push + run: dotnet nuget push Package\Release\Packages\*.nupkg --source https://nuget.pkg.github.com/pyrevitlabs/index.json --api-key ${{ secrets.GITHUB_TOKEN }} diff --git a/Build.proj b/Build.proj index 7c0c7d07..0f722282 100644 --- a/Build.proj +++ b/Build.proj @@ -20,7 +20,7 @@ $(MajorVersion).$(MinorVersion).$(MicroVersion)-$(ReleaseLevel)$(ReleaseSerial) $(RootDir)\Package\$(Configuration)\Stage\DynamicLanguageRuntime.$(PackageVersion) - $(RootDir)\Package\$(Configuration)\Packages\DynamicLanguageRuntime.$(PackageVersion) + $(RootDir)\Package\$(Configuration)\Packages From ac92922ecb9ee81ccef5964fff512ef01cefdc62 Mon Sep 17 00:00:00 2001 From: Andrea Ghensi Date: Wed, 29 May 2024 05:05:53 +1000 Subject: [PATCH 2/2] build: nuget package only on pyrevit-*main --- .github/workflows/main.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ae3fcfd5..e3b1182f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,13 +20,15 @@ jobs: dotnet-version: '6.0.x' - name: Build run: pwsh make.ps1 - - name: Package - run: pwsh make.ps1 package - name: Test (net48) run: ./make.ps1 -frameworks net48 test-all shell: pwsh - name: Test (net6.0) run: ./make.ps1 -frameworks net6.0 test-all shell: pwsh + - name: Package + run: pwsh make.ps1 package + if: ${{ contains(fromJSON('["refs/heads/pyrevit-main","refs/heads/pyrevit-5-main"]'), github.ref) }} - name: Push - run: dotnet nuget push Package\Release\Packages\*.nupkg --source https://nuget.pkg.github.com/pyrevitlabs/index.json --api-key ${{ secrets.GITHUB_TOKEN }} + run: dotnet nuget push Package\Release\Packages\*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/pyrevitlabs/index.json --api-key ${{ secrets.GITHUB_TOKEN }} + if: ${{ contains(fromJSON('["refs/heads/pyrevit-main","refs/heads/pyrevit-5-main"]'), github.ref) }}