Skip to content

Commit

Permalink
Merge branch 'dev' into dev-v9
Browse files Browse the repository at this point in the history
  • Loading branch information
martincostello committed Feb 29, 2024
2 parents c3b4b83 + e3311b5 commit 6e7e7ca
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 20 deletions.
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "06:30"
timezone: Europe/London
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "06:30"
timezone: Europe/London
open-pull-requests-limit: 99
ignore:
- dependency-name: "Microsoft.AspNetCore.Authentication.Google"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.AspNetCore.Mvc.Testing"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.AspNetCore.TestHost"
update-types: ["version-update:semver-major"]
- dependency-name: "Microsoft.DotNet.Arcade.Sdk"
- dependency-name: "Microsoft.DotNet.Helix.Sdk"
- dependency-name: "Microsoft.IdentityModel.Protocols.OpenIdConnect"
47 changes: 32 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}

outputs:
dotnet-sdk-version: ${{ steps.setup-dotnet.outputs.dotnet-version }}

strategy:
fail-fast: false
matrix:
Expand All @@ -37,10 +40,14 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup .NET SDK
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
id: setup-dotnet

- name: Setup NuGet
uses: nuget/setup-nuget@v1
uses: nuget/setup-nuget@a21f25cd3998bf370fde17e3f1b4c12c175172f9 # v2.0.0
with:
nuget-version: '5.11.0'

Expand Down Expand Up @@ -71,20 +78,20 @@ jobs:
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine

- name: Publish logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ always() }}
with:
name: logs-${{ matrix.os_name }}
path: ./artifacts/log/Release

- name: Publish NuGet packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: packages-${{ matrix.os_name }}
path: ./artifacts/packages/Release/Shipping

- name: Publish test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: ${{ always() }}
with:
name: testresults-${{ matrix.os_name }}
Expand All @@ -96,12 +103,14 @@ jobs:
steps:

- name: Download packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: packages-windows

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}

- name: Validate NuGet packages
shell: pwsh
Expand All @@ -120,7 +129,7 @@ jobs:
}
publish-myget:
needs: validate-packages
needs: [ build, validate-packages ]
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
Expand All @@ -131,31 +140,39 @@ jobs:
steps:

- name: Download packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: packages-windows

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}

- name: Push NuGet packages to aspnet-contrib MyGet
run: nuget push "*.nupkg" -ApiKey ${{ secrets.MYGET_API_KEY }} -SkipDuplicate -Source https://www.myget.org/F/aspnet-contrib/api/v3/index.json
env:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
run: nuget push "*.nupkg" -ApiKey "${MYGET_API_KEY}" -SkipDuplicate -Source https://www.myget.org/F/aspnet-contrib/api/v3/index.json

publish-nuget:
needs: validate-packages
needs: [ build, validate-packages ]
runs-on: ubuntu-latest
if: |
github.event.repository.fork == false &&
startsWith(github.ref, 'refs/tags/')
steps:

- name: Download packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
with:
name: packages-windows

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}

- name: Push NuGet packages to NuGet.org
run: nuget push "*.nupkg" -ApiKey ${{ secrets.NUGET_API_KEY }} -SkipDuplicate -Source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push "*.nupkg" -ApiKey "${NUGET_API_KEY}" -SkipDuplicate -Source https://api.nuget.org/v3/index.json
10 changes: 5 additions & 5 deletions .github/workflows/code-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
category: "/language:${{ matrix.language }}"
36 changes: 36 additions & 0 deletions .github/workflows/update-dotnet-sdks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: update-dotnet-sdk

on:
schedule:
- cron: '00 19 * * TUE'
workflow_dispatch:
inputs:
branch:
description: 'The branch to run the SDK updates for.'
required: false
type: choice
options:
- 'dev'
- 'dev-v9'
default: 'dev'

permissions:
contents: read
pull-requests: read

jobs:
update-sdk:
name: Update .NET SDK
uses: martincostello/update-dotnet-sdk/.github/workflows/update-dotnet-sdk.yml@9d42ad9bcbd97a74394c7273c9c616b4bf136b53 # v3.1.3
permissions:
contents: write
pull-requests: write
with:
labels: 'dependencies,.NET'
ref: ${{ inputs.branch || 'dev' }}
update-nuget-packages: true
user-email: ${{ vars.SERVICE_ACCOUNT_GIT_EMAIL }}
user-name: ${{ vars.SERVICE_ACCOUNT_GIT_NAME }}
secrets:
application-id: ${{ secrets.SERVICE_ACCOUNT_ID }}
application-private-key: ${{ secrets.SERVICE_ACCOUNT_PRIVATE_KEY }}

0 comments on commit 6e7e7ca

Please sign in to comment.