Skip to content

Commit

Permalink
Update FileSorter.csproj (#6)
Browse files Browse the repository at this point in the history
Compiles against .NET 6 instead of .NET 5 now

Updating workflow to use .NET 6 for build & pkg

Can't use GH Run Id in Version anymore because numbers are too large

Since run number < run id, have to bump minor ver for upgrades to work
  • Loading branch information
pra1ries authored and brandonh-msft committed Apr 25, 2022
1 parent dc87180 commit 332fd3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- "LICENSE"

env:
APP_VERSION: "0.1.${{ github.run_id }}"
APP_VERSION: "0.2.${{ github.run_number }}"

jobs:
build-and-package:
Expand All @@ -27,16 +27,16 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
dotnet-version: 6.x

- name: dotnet publish
run: dotnet publish --self-contained -r win-x64 -f net5.0 -c release /p:Version=${{ env.APP_VERSION }}
run: dotnet publish --self-contained -r win-x64 -f net6.0 -c release /p:Version=${{ env.APP_VERSION }}

- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: binaries
path: bin\Release\net5.0\win-x64\publish\**
path: bin\Release\net6.0\win-x64\publish\**

- name: Package
run: cd choco && choco pack --version ${{ env.APP_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion FileSorter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<StartupObject>FileSorter.Program</StartupObject>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>0.0.1</Version>
Expand Down
2 changes: 1 addition & 1 deletion choco/filesorter.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<!-- this section controls what actually gets packaged into the Chocolatey package -->
<file src="createdump.exe.ignore" target="." />
<file src="tools\**" target="tools" />
<file src="..\bin\release\net5.0\win-x64\publish\**" target="." />
<file src="..\bin\release\net6.0\win-x64\publish\**" target="." />
<!--Building from Linux? You may need this instead: <file src="tools/**" target="tools" />-->
</files>
</package>

0 comments on commit 332fd3c

Please sign in to comment.