Skip to content

Commit

Permalink
Update ci.yaml and build scripts
Browse files Browse the repository at this point in the history
[skip release]
  • Loading branch information
natemcmaster committed Jun 25, 2023
1 parent b25bb58 commit 930a00f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
12 changes: 0 additions & 12 deletions .config/dotnet-tools.json

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "7.0.x"
- name: Run build script
id: build_script
run: ./build.ps1 -ci
Expand Down Expand Up @@ -67,6 +67,7 @@ jobs:
with:
name: ${{ env.PACKAGE_VERSION }}
tag_name: v${{ env.PACKAGE_VERSION }}
generate_release_notes: true
body: |
## How to get this update
Update to the latest version:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It launches a server in the current working directory and serves all files in it

## Get started

[Install .NET 5 or newer](https://get.dot.net) and run this command:
[Install .NET 6 or newer](https://get.dot.net) and run this command:

```
dotnet tool install --global dotnet-serve
Expand Down
6 changes: 2 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ $artifacts = "$PSScriptRoot/artifacts/"

Remove-Item -Recurse $artifacts -ErrorAction Ignore

exec dotnet tool restore

[string[]] $formatArgs=@()
if ($ci) {
$formatArgs += '--check'
$formatArgs += '--verify-no-changes'
}

exec dotnet tool run dotnet-format -- -v detailed @formatArgs
exec dotnet format -v detailed @formatArgs
exec dotnet build --configuration $Configuration
exec dotnet pack --no-build --configuration $Configuration -o $artifacts
exec dotnet test --no-build --configuration $Configuration `
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project InitialTargets="UpdateCiSettings">

<Target Name="UpdateCiSettings" Condition="'$(CI)' == 'true' AND '$(IsPackable)' == 'true'">
<Message Importance="High" Text="::set-output name=package_version::$(PackageVersion)" />
<Target Name="UpdateCiSettings" Condition="'$(CI)' == 'true' AND '$(IsPackable)' == 'true' and '$(GITHUB_OUTPUT)' != ''">
<WriteLinesToFile File="$(GITHUB_OUTPUT)" Overwrite="false" Lines="package_version=$(PackageVersion)" />
</Target>

</Project>

0 comments on commit 930a00f

Please sign in to comment.