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
35 changes: 30 additions & 5 deletions .github/workflows/release-extensions-distributedcache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ name: Release-Extension-DistributedCache
on:
workflow_dispatch:

permissions:
contents: read

jobs:
release:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: 5.0.x
- name: Install dependencies
Expand All @@ -18,6 +23,26 @@ jobs:
- name: Test
run: dotnet test src/sdk/Extensions/Microsoft.Extensions.Caching.UnifiedRedisPlatform/Microsoft.Extensions.Caching.UnifiedRedisPlatform.csproj --no-restore --verbosity normal
- name: Pack
run: dotnet pack src/sdk/Extensions/Microsoft.Extensions.Caching.UnifiedRedisPlatform/Microsoft.Extensions.Caching.UnifiedRedisPlatform.csproj
run: dotnet pack src/sdk/Extensions/Microsoft.Extensions.Caching.UnifiedRedisPlatform/Microsoft.Extensions.Caching.UnifiedRedisPlatform.csproj --output ./artifacts
- name: Upload package
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nupkg
path: artifacts/*.nupkg
if-no-files-found: error

# Publish runs without checking out repo code, so build/test-time code never has access to the NuGet key.
publish:
needs: build
runs-on: ubuntu-latest
environment: nuget-publish
steps:
- name: Download package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: nupkg
path: artifacts
- name: Publish
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NuGet_API_Key }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push "artifacts/*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NuGet_API_Key }}
39 changes: 30 additions & 9 deletions .github/workflows/release-sdk.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
name: Release
on:
workflow_dispatch:

permissions:
contents: read

jobs:
release:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: 5.0.x
- name: Install dependencies
run: dotnet restore src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj
- name: Build
run: dotnet build src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj --no-restore
- name: Test
run: dotnet test src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj --no-restore --verbosity normal
- name: Pack
run: dotnet pack src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj
run: dotnet pack src/sdk/Core/Microsoft.UnifiedRedisPlatform.Core.csproj --output ./artifacts
- name: Upload package
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nupkg
path: artifacts/*.nupkg
if-no-files-found: error

# Publish runs without checking out repo code, so build/test-time code never has access to the NuGet key.
publish:
needs: build
runs-on: ubuntu-latest
environment: nuget-publish
steps:
- name: Download package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: nupkg
path: artifacts
- name: Publish
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NuGet_API_Key }} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push "artifacts/*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NuGet_API_Key }}
Loading