Skip to content

Add task list component generation #808

Add task list component generation

Add task list component generation #808

Workflow file for this run

name: ci
on:
push:
branches:
- dev
- main
tags:
- v*
paths-ignore:
- docs/**
- LICENSE
- '**.md'
pull_request:
branches:
- dev
- main
- v1.0
paths-ignore:
- docs/**
- LICENSE
- '**.md'
jobs:
build:
name: "Build & package"
runs-on: ubuntu-latest
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Install tools
run: |
dotnet tool restore --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
- name: Clean
run: |
dotnet clean --configuration Release
dotnet nuget locals all --clear
- name: Restore
run: dotnet restore
- name: Format
run: dotnet format --verify-no-changes
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Install Playwright
run: pwsh ./tests/GovUk.Frontend.AspNetCore.IntegrationTests/bin/Release/net6.0/playwright.ps1 install
- name: Test
run: |
dotnet test tests/GovUk.Frontend.AspNetCore.Tests/ --configuration Release --no-build
dotnet test tests/GovUk.Frontend.AspNetCore.ConformanceTests/ --configuration Release --no-build
dotnet test tests/GovUk.Frontend.AspNetCore.IntegrationTests/ --configuration Release --no-build
- name: Package
run: dotnet pack src/GovUk.Frontend.AspNetCore/ --configuration Release --no-build
env:
MINVERBUILDMETADATA: ${{ env.GITHUB_RUN_NUMBER }}
- name: Publish package artifact
uses: actions/upload-artifact@v2-preview
with:
name: GovUk.Frontend.AspNetCore.nupkg
path: src/GovUk.Frontend.AspNetCore/bin/Release/*.nupkg
release:
name: "Release"
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download package artifact
uses: actions/download-artifact@v2
with:
name: GovUk.Frontend.AspNetCore.nupkg
- name: Publish package to NuGet
run: dotnet nuget push **/*.nupkg --api-key $NUGET_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}