diff --git a/.github/workflows/BuildDeploy.yml b/.github/workflows/BuildDeploy.yml index f396595..2533eec 100644 --- a/.github/workflows/BuildDeploy.yml +++ b/.github/workflows/BuildDeploy.yml @@ -25,10 +25,22 @@ jobs: windows-latest: name: windows-latest runs-on: windows-latest + + permissions: write-all + environment: + name: release steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + + - name: NBGV + id: nbgv + uses: dotnet/nbgv@master + with: + setAllVars: true + - run: echo 'SemVer2=${{ steps.nbgv.outputs.SemVer2 }}' + - name: 'Cache: .nuke/temp, ~/.nuget/packages' uses: actions/cache@v3 with: @@ -36,12 +48,29 @@ jobs: .nuke/temp ~/.nuget/packages key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + - name: 'Run: Compile, Deploy' run: ./build.cmd Compile Deploy env: NuGetApiKey: ${{ secrets.NUGET_API_KEY }} + - name: 'Publish: output' uses: actions/upload-artifact@v3 with: name: output path: output + + - name: Changelog + uses: glennawatson/ChangeLog@v1 + id: changelog + + - name: Create Release + uses: actions/create-release@v1.1.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.nbgv.outputs.SemVer2 }} + release_name: ${{ steps.nbgv.outputs.SemVer2 }} + body: | + ${{ steps.changelog.outputs.commitLog }} + diff --git a/Directory.Build.props b/Directory.Build.props index b30732a..6d621aa 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -32,7 +32,7 @@ true - + @@ -45,7 +45,7 @@ - + diff --git a/build/Build.cs b/build/Build.cs index 8bc60e1..b4cf804 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -10,19 +10,19 @@ using CP.BuildTools; using static Nuke.Common.Tools.DotNet.DotNetTasks; -[GitHubActions( - "BuildOnly", - GitHubActionsImage.WindowsLatest, - OnPushBranchesIgnore = new[] { "main" }, - FetchDepth = 0, - InvokedTargets = new[] { nameof(Compile) })] -[GitHubActions( - "BuildDeploy", - GitHubActionsImage.WindowsLatest, - OnPushBranches = new[] { "main" }, - FetchDepth = 0, - ImportSecrets = new[] { nameof(NuGetApiKey) }, - InvokedTargets = new[] { nameof(Compile), nameof(Deploy) })] +////[GitHubActions( +//// "BuildOnly", +//// GitHubActionsImage.WindowsLatest, +//// OnPushBranchesIgnore = new[] { "main" }, +//// FetchDepth = 0, +//// InvokedTargets = new[] { nameof(Compile) })] +////[GitHubActions( +//// "BuildDeploy", +//// GitHubActionsImage.WindowsLatest, +//// OnPushBranches = new[] { "main" }, +//// FetchDepth = 0, +//// ImportSecrets = new[] { nameof(NuGetApiKey) }, +//// InvokedTargets = new[] { nameof(Compile), nameof(Deploy) })] class Build : NukeBuild { /// Support plugins are available for: @@ -58,7 +58,7 @@ class Build : NukeBuild PackagesDirectory.CreateOrCleanDirectory(); await this.UpdateVisualStudio(); - await this.InstallDotNetSdk("3.1.x", "5.x.x", "6.x.x", "7.x.x"); + await this.InstallDotNetSdk("6.x.x", "7.x.x", "8.x.x"); this.InstallAspNetCore("6.0"); this.InstallAspNetCore("7.0"); }); diff --git a/global.json b/global.json index 9cbd28e..ddc0c7a 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,6 @@ { "sdk": { - "version": "7.0.400" + "version": "8.0.10", + "rollForward": "latestFeature" } }