Skip to content

Version 5.0.2 - Bricks floating Downstream #65

Version 5.0.2 - Bricks floating Downstream

Version 5.0.2 - Bricks floating Downstream #65

Workflow file for this run

name: Build-Release
on:
push:
tags: v*
release:
types: [published]
jobs:
build:
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.100
- name: Build Version
# run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:11}) // deprecated
run: echo "RELEASE_VERSION=$($env:GITHUB_REF.SubString(11))" >> $env:GITHUB_ENV
- name: Build Project
run: dotnet build --configuration Release -p:Version=$env:RELEASE_VERSION
- name: Test Project
run: dotnet test --no-build --configuration Release --logger trx
- name: Pack Project
run: dotnet pack --no-build --output ./artifacts --configuration Release -p:Version=$env:RELEASE_VERSION
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./artifacts
publish-nuget:
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: [ build ]
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_APIKEY }}
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.100
source-url: https://api.nuget.org/v3/index.json
- uses: actions/download-artifact@v4
with:
name: artifacts
path: ./artifacts
- name: Upload to NuGet
run: dotnet nuget push ./artifacts/**/*.nupkg --skip-duplicate -n -k $NUGET_AUTH_TOKEN