Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDP-2744] Fix auto-merge and nuget conflict #99

Merged
merged 12 commits into from
Dec 17, 2024
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)) {
PrincessMadMath marked this conversation as resolved.
Show resolved Hide resolved
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
Loading