Skip to content

Updates to .NET8

Updates to .NET8 #66

Workflow file for this run

name: Continuous integration
on:
pull_request:
branches:
- develop
- main
jobs:
build_test_pack:
name: Build, test & pack
runs-on: windows-latest
env:
buildConfiguration: release
versionSuffix: ${{ github.ref == 'refs/heads/develop' && 'pre-' || 'ci-' }}${{github.RUN_NUMBER }}
DOTNET_NOLOGO: 1
steps:
- uses: actions/checkout@v2
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration $env:buildConfiguration --version-suffix $env:versionSuffix
- name: Test
run: dotnet test --no-build --configuration $env:buildConfiguration
- name: Pack
run: dotnet pack --no-build --configuration $env:buildConfiguration --version-suffix $env:versionSuffix
- name: Archive packages
uses: actions/upload-artifact@v2
with:
name: packages
path: artifacts/*.nupkg
retention-days: 2
# publish:
# name: Publish
# needs: build_test_pack
# runs-on: windows-latest
# env:
# nugetSource: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
# DOTNET_NOLOGO: 1
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v2
# with:
# name: packages
# - name: Publish to Github Packages
# run: dotnet nuget push *.nupkg --source $env:nugetSource --skip-duplicate --api-key ${{ secrets.GITHUB_TOKEN }}
# cleanup:
# name: Cleanup
# needs: build_test_pack
# runs-on: ubuntu-latest
# steps:
# - name: Cleanup old Packages
# uses: actions/delete-package-versions@v3
# with:
# package-name: 'EPiServer.Templates'
# min-versions-to-keep: 10
# # 1-in-1-out
# num-old-versions-to-delete: 1
# delete-only-pre-release-versions: "true"