-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to NET 8 and use GitHub actions (#172)
* Update to NET 8 and use GitHub actions * fix build take 1 * fix build take 2
- Loading branch information
Showing
8 changed files
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: .NET | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Update Version | ||
run: | | ||
((Get-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs -Raw) -Replace "1.0.0.0", "0.9.8.${{ github.run_number }}") | Set-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs | ||
((Get-Content -Path .\src\SQLQueryStress\Properties\AssemblyInfo.cs -Raw) -Replace "1.0.0.0", "0.9.8.${{ github.run_number }}") | Set-Content -Path .\src\SqlQueryStressCLI\AssemblyInfo.cs | ||
shell: pwsh | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Build | ||
run: dotnet build ./src/SQLQueryStress.sln --configuration Release | ||
|
||
- name: dotnet publish | ||
run: dotnet publish ./src/SQLQueryStress/SqlQueryStress.csproj --configuration Release --output .\src\SQLQueryStress\bin\Publish\net8.0-windows\ --self-contained true | ||
|
||
- name: zip app | ||
run: 7z a SqlQueryStress-0.9.8.${{ env.VERSION }}.zip .\src\SQLQueryStress\bin\Publish\net8.0-windows\*.exe | ||
|
||
- name: Publish artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Artifacts | ||
path: | | ||
*.zip | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: | | ||
**\\*.nupkg | ||
# - name: Publish NuGet | ||
# if: startsWith(github.ref, 'refs/heads/master') && github.repository_owner == 'ErikEJ' | ||
# run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "Windows only")] | ||
[assembly: SuppressMessage("Maintainability", "CA1515:Consider making public types internal", Justification = "Console app")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters