Skip to content

release

release #1

Workflow file for this run

name: pack-for-release
on:
workflow_dispatch:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
jobs:
build-and-pack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
9.0.x
- name: Restore
run: dotnet restore --nologo
- name: Run Data Builder
run: dotnet run --project src/TimeZoneNames.DataBuilder -c Release --nologo --no-restore
- name: Build Solution
run: dotnet build -c Release --nologo --no-restore
- name: Test
run: dotnet test -c Release --nologo --no-build -l GitHubActions -l "trx;LogFileName=testresults.trx"
- name: Pack
run: dotnet pack -c Release --nologo --no-build
- name: Push to NuGet
run: dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} **/*.nupkg
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: src/**/Release/*.*nupkg
if-no-files-found: error