Skip to content

HotAvalonia - 1.0.0

HotAvalonia - 1.0.0 #2

Workflow file for this run

name: release
on:
release:
types:
- published
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: true
NUGET_XMLDOC_MODE: skip
BUILD_OUTPUT: ${{ github.workspace }}/dist
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Setup .NET SDK
uses: actions/setup-dotnet@main
- name: Restore dependencies
run: dotnet restore -tl
- name: Build (Debug)
run: dotnet build -tl -c Debug --no-restore
- name: Build (Release)
run: dotnet build -tl -c Release --no-restore
- name: Run tests
run: dotnet test -tl -c Release --no-build
- name: Create NuGet packages
run: dotnet pack -tl -c Release --no-build -o "${{ env.BUILD_OUTPUT }}"
- name: Upload NuGets to GitHub
uses: Kir-Antipov/mc-publish@v3.3
with:
files: ${{ env.BUILD_OUTPUT }}/*.nupkg
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload NuGets to NuGet.org
run: dotnet nuget push "${{ env.BUILD_OUTPUT }}/*.nupkg" --api-key "${{ secrets.NUGET_TOKEN }}" --source "https://api.nuget.org/v3/index.json" --skip-duplicate