Bump xunit.runner.visualstudio from 2.4.5 to 2.5.1 #406
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+-preview' | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [linux-debug, linux-release, macos-debug, macos-release, windows-debug, windows-release] | |
include: | |
- build: linux-debug | |
os: ubuntu-latest | |
config: debug | |
- build: linux-release | |
os: ubuntu-latest | |
config: release | |
- build: macos-debug | |
os: macos-latest | |
config: debug | |
- build: macos-release | |
os: macos-latest | |
config: release | |
- build: windows-debug | |
os: windows-latest | |
config: debug | |
- build: windows-release | |
os: windows-latest | |
config: release | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 5.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 5.0.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore | |
run: dotnet restore | |
shell: bash | |
- name: Set MINVERBUILDMETADATA | |
run: echo MINVERBUILDMETADATA=$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: dotnet build -c ${{ matrix.config }} -v d | |
shell: bash | |
- name: Test | |
shell: bash | |
env: | |
TEST_STORAGE_ACCOUNT_NAME: ${{ secrets.TEST_STORAGE_ACCOUNT_NAME }} | |
TEST_STORAGE_ACCOUNT_KEY: ${{ secrets.TEST_STORAGE_ACCOUNT_KEY }} | |
run: dotnet test -c ${{ matrix.config }} -v d | |
- name: Package templates | |
run: dotnet pack -c ${{ matrix.config }} -p:RepositoryUrl=https://github.com/${{ github.repository }}.git | |
working-directory: source/dotnettemplates | |
shell: bash | |
publish: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 5.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 5.0.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore | |
run: dotnet restore | |
shell: bash | |
- name: Set MINVERBUILDMETADATA | |
run: echo MINVERBUILDMETADATA=$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: dotnet build -c Release | |
shell: bash | |
- name: Test | |
shell: bash | |
env: | |
TEST_STORAGE_ACCOUNT_NAME: ${{ secrets.TEST_STORAGE_ACCOUNT_NAME }} | |
TEST_STORAGE_ACCOUNT_KEY: ${{ secrets.TEST_STORAGE_ACCOUNT_KEY }} | |
run: dotnet test -c Release | |
- name: Package templates | |
run: dotnet pack -c Release -p:RepositoryUrl=https://github.com/${{ github.repository }}.git | |
working-directory: source/dotnettemplates | |
shell: bash | |
- name: Publish Github Packages | |
run: | | |
for nupkg in $(find . -name *.nupkg) | |
do | |
echo Pushing $nupkg | |
dotnet nuget push $nupkg --api-key ${{ secrets.GHPACKAGES_PAT }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate | |
done | |
shell: bash | |
release: | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET 5.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 5.0.x | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore | |
run: dotnet restore | |
shell: bash | |
- name: Set MINVERBUILDMETADATA | |
run: echo MINVERBUILDMETADATA=$(git rev-parse --short ${GITHUB_SHA}) >> $GITHUB_ENV | |
shell: bash | |
- name: Build | |
run: dotnet build -c Release | |
shell: bash | |
- name: Test | |
shell: bash | |
env: | |
TEST_STORAGE_ACCOUNT_NAME: ${{ secrets.TEST_STORAGE_ACCOUNT_NAME }} | |
TEST_STORAGE_ACCOUNT_KEY: ${{ secrets.TEST_STORAGE_ACCOUNT_KEY }} | |
run: dotnet test -c Release | |
- name: Package templates | |
run: dotnet pack -c Release -p:RepositoryUrl=https://github.com/${{ github.repository }}.git | |
working-directory: source/dotnettemplates | |
shell: bash | |
- name: "Build Changelog" | |
id: github_release | |
uses: mikepenz/release-changelog-builder-action@main | |
with: | |
configuration: ".github/workflows/configuration.json" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: ${{ steps.github_release.outputs.changelog }} | |
prerelease: ${{ contains(github.ref, '-preview') }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Github Packages | |
run: | | |
for nupkg in $(find . -name *.nupkg) | |
do | |
echo Pushing $nupkg | |
dotnet nuget push $nupkg --api-key ${{ secrets.GHPACKAGES_PAT }} --source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --skip-duplicate | |
done | |
shell: bash | |
- name: Publish Nuget Packages | |
run: | | |
for nupkg in $(find . -name *.nupkg) | |
do | |
echo Pushing $nupkg | |
dotnet nuget push $nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | |
done | |
shell: bash |