Skip to content

VersionBump : v1.0.0-preview.1 #1

VersionBump : v1.0.0-preview.1

VersionBump : v1.0.0-preview.1 #1

Workflow file for this run

name: Publish Packages
on:
push:
tags:
- 'v*.*.*' # Match version tags like v1.0.0
# Allow us to run the upload manually
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.x'
- name: Restore dependencies
run: dotnet restore CodeOfChaos.Ansi.sln
- name: Build
run: dotnet build CodeOfChaos.Ansi.sln --configuration Release --no-restore
# Ensure that the tests must pass
# The job will fail automatically if any test fails because `dotnet test` exits with a non-zero code
- name: Run tests - Extensions
run: dotnet run -c Release --no-restore --no-build
working-directory: "tests/Tests.CodeOfChaos.Ansi"
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: |
dotnet nuget push src/CodeOfChaos.Ansi/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/CodeOfChaos.Ansi.Generators/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate