Skip to content

Commit

Permalink
[IDP-2744] Fix auto-merge and nuget conflict (#99)
Browse files Browse the repository at this point in the history
* Update Build.ps1

* Update ci.yml

* Update CI.yml to use dotnet version global.json + publish temp version

* Target framework 8 instead of 6

* Try debug build.ps1

* Trying something

* Use windows instead

* Remove logging

* Update CI workflow to run on Windows for .NET Framework 4.6.2 support

* Trying alternative

* Try condition for os

* Update Build.ps1

Co-authored-by: Gérald Barré <[email protected]>

---------

Co-authored-by: Gérald Barré <[email protected]>
  • Loading branch information
PrincessMadMath and meziantou authored Dec 17, 2024
1 parent 056f1ce commit 21562a3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@ name: CI

on:
pull_request:
branches: ["main"]
branches: ["main", "master"]
paths-ignore: ["*.md"]

push:
branches:
- "renovate/**"

# Prevent duplicate runs if Renovate falls back to creating a PR
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
main:
runs-on: ubuntu-latest
ci:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
Expand All @@ -19,7 +28,19 @@ jobs:

- uses: actions/setup-dotnet@v4
with:
global-json-file: "global.json"
source-url: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
env:
NUGET_AUTH_TOKEN: ${{ secrets.GSOFT_NUGET_API_KEY }}

- run: ./Build.ps1
shell: pwsh
env:
NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
NUGET_API_KEY: ${{ secrets.GSOFT_NUGET_API_KEY }}

linearb:
needs: [ci]
uses: gsoft-inc/wl-reusable-workflows/.github/workflows/linearb-deployment.yml@main
with:
environment: development
secrets: inherit
4 changes: 2 additions & 2 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Process {
Exec { & dotnet test -c Release --no-build --results-directory "$outputDir" --no-restore -l "trx" -l "console;verbosity=detailed" }
Exec { & dotnet pack -c Release --no-build -o "$outputDir" }

if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) {
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY }
if (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:NUGET_API_KEY) -and ($IsLinux)) {
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate }
}
}
finally {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFramework);net462</TargetFrameworks>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net462;net8.0;netstandard2.0</TargetFrameworks>
<IsPackable>True</IsPackable>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand Down

0 comments on commit 21562a3

Please sign in to comment.