Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ jobs:
os: [ windows-latest ]

steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x - 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
7.0.x
6.0.x

- name: Show dotnet Version
Expand All @@ -30,4 +34,4 @@ jobs:

- name: Build with dotnet
run: |
dotnet build --configuration Release D:\a\Dispose.Scope\Dispose.Scope\DisposeScope.sln
dotnet build --configuration Release DisposeScope.sln -p:CheckEolTargetFramework=false
12 changes: 8 additions & 4 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ jobs:
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v2
- name: Setup .NET SDK
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x - 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
7.0.x
6.0.x

- name: Show dotnet Version
Expand All @@ -30,8 +34,8 @@ jobs:

- name: Build with dotnet
run: |
dotnet build --configuration Release /home/runner/work/Dispose.Scope/Dispose.Scope/DisposeScope.sln
dotnet build --configuration Release DisposeScope.sln -p:CheckEolTargetFramework=false

- name: Run tests
run: |
dotnet test /home/runner/work/Dispose.Scope/Dispose.Scope/tests/Dispose.Scope.Tests/Dispose.Scope.Tests.csproj
dotnet test tests/Dispose.Scope.Tests/Dispose.Scope.Tests.csproj -p:CheckEolTargetFramework=false
53 changes: 41 additions & 12 deletions .github/workflows/release_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET SDK
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x - 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release /home/runner/work/Dispose.Scope/Dispose.Scope/DisposeScope.sln
run: dotnet build --configuration Release DisposeScope.sln -p:CheckEolTargetFramework=false
- name: Pack with dotnet
env:
VERSION: ${{ github.ref_name }}
run: dotnet pack /home/runner/work/Dispose.Scope/Dispose.Scope/DisposeScope.sln --version-suffix $VERSION -o /home/runner/work/nugetpkgs -c Release --no-build
run: dotnet pack DisposeScope.sln --version-suffix $VERSION -o ./nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
path: ./nugetpkgs

release_nuget:
name: Release to Nuget
Expand All @@ -37,14 +41,39 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
path: .
- name: Debug downloaded artifacts
shell: bash
run: |
set -e
echo "PWD: $(pwd)"
echo "Top-level:"
ls -la
echo "NUPKG files:"
ls -la *.nupkg || true
- name: Release
shell: bash
run: |
for file in nugetpkgs/*.nupkg
do
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
set -e
shopt -s nullglob

# All non-library projects should have IsPackable=false, so we can push everything we packed.
files=( *.nupkg )
if [ ${#files[@]} -eq 0 ]; then
echo "No .nupkg files found in workspace root."
exit 1
fi

for file in "${files[@]}"; do
case "$file" in
*.snupkg|*symbols*.nupkg)
echo "Skipping: $file"
continue
;;
esac
echo "Pushing: $file"
dotnet nuget push "$file" -k "${{ secrets.NUGET_API_KEY }}" --skip-duplicate -s https://www.nuget.org/api/v2/package
done
55 changes: 42 additions & 13 deletions .github/workflows/release_unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET SDK
- uses: actions/checkout@v4
- name: Setup .NET SDK 6.0.x - 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
run: dotnet build --configuration Release /home/runner/work/Dispose.Scope/Dispose.Scope/DisposeScope.sln
run: dotnet build --configuration Release DisposeScope.sln -p:CheckEolTargetFramework=false
- name: Pack with dotnet
env:
VERSION: ${{ github.ref_name }}
run: dotnet pack /home/runner/work/Dispose.Scope/Dispose.Scope/DisposeScope.sln --version-suffix $VERSION -o /home/runner/work/nugetpkgs -c Release --no-build
run: dotnet pack DisposeScope.sln --version-suffix $VERSION -o ./nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: nugetpkgs
path: /home/runner/work/nugetpkgs
path: ./nugetpkgs

release_nuget:
name: Release to Nuget
Expand All @@ -38,14 +42,39 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: nugetpkgs
- name: list nugetpkgs
run: ls nugetpkgs
path: .
- name: Debug downloaded artifacts
shell: bash
run: |
set -e
echo "PWD: $(pwd)"
echo "Top-level:"
ls -la
echo "NUPKG files:"
ls -la *.nupkg || true
- name: Release
shell: bash
run: |
for file in nugetpkgs/*.nupkg
do
dotnet nuget push $file -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate -s https://www.nuget.org/api/v2/package
done
set -e
shopt -s nullglob

# All non-library projects should have IsPackable=false, so we can push everything we packed.
files=( *.nupkg )
if [ ${#files[@]} -eq 0 ]; then
echo "No .nupkg files found in workspace root."
exit 1
fi

for file in "${files[@]}"; do
case "$file" in
*.snupkg|*symbols*.nupkg)
echo "Skipping: $file"
continue
;;
esac
echo "Pushing: $file"
dotnet nuget push "$file" -k "${{ secrets.NUGET_API_KEY }}" --skip-duplicate -s https://www.nuget.org/api/v2/package
done
Loading