Skip to content

Commit 18ba4c3

Browse files
stevehansenclaude
andcommitted
chore: Update CI and NuGet publishing
- Switch NuGet publishing to OIDC trusted publishing (publish.yml) - Remove broken NuGet push from ci.yml (env var was on wrong step) - Add osx-arm64 build target - Drop EOL targets (netcoreapp3.1, net6.0), add net9.0 and net10.0 - Remove deprecated TrimMode property Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a198c97 commit 18ba4c3

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ jobs:
99
name: Release
1010
strategy:
1111
matrix:
12-
kind: ['linux', 'windows', 'macOS']
12+
kind: ['linux', 'windows', 'macOS-x64', 'macOS-arm64']
1313
include:
1414
- kind: linux
1515
os: ubuntu-latest
1616
target: linux-x64
1717
- kind: windows
1818
os: windows-latest
1919
target: win-x64
20-
- kind: macOS
20+
- kind: macOS-x64
2121
os: macos-latest
2222
target: osx-x64
23+
- kind: macOS-arm64
24+
os: macos-latest
25+
target: osx-arm64
2326
runs-on: ${{ matrix.os }}
2427

2528
steps:
@@ -44,10 +47,6 @@ jobs:
4447
# Pack files
4548
if [ "${{ matrix.target }}" == "win-x64" ]; then
4649
7z a -tzip "${release_name}.zip" "./${release_name}/*"
47-
48-
dotnet pack --configuration ReleaseLibrary --output .
49-
50-
dotnet nuget push SqlInliner.$tag.nupkg --api-key $NUGET_TOKEN
5150
else
5251
tar czvf "${release_name}.tar.gz" "$release_name"
5352
fi
@@ -61,4 +60,3 @@ jobs:
6160
files: "SqlInliner-*"
6261
env:
6362
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64-
NUGET_TOKEN: ${{ secrets.NUGET }}

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for OIDC trusted publishing
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v5
20+
with:
21+
dotnet-version: '8.0.x'
22+
23+
- name: Pack
24+
run: dotnet pack src/SqlInliner/SqlInliner.csproj -c Release --output ./nupkg
25+
26+
- name: NuGet login (OIDC)
27+
uses: nuget/login@v1
28+
id: login
29+
with:
30+
user: ${{ vars.NUGET_USER }}
31+
32+
- name: Publish to NuGet
33+
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

src/SqlInliner/SqlInliner.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
<PublishSingleFile>True</PublishSingleFile>
2525
<PublishReadyToRun>True</PublishReadyToRun>
2626
<PublishTrimmed>True</PublishTrimmed>
27-
<TrimMode>Link</TrimMode>
2827
</PropertyGroup>
2928

3029
<PropertyGroup Condition="'$(Configuration)' == 'ReleaseLibrary'">
3130
<OutputType>Library</OutputType>
32-
<TargetFrameworks>net472;netstandard2.0;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
31+
<TargetFrameworks>net472;netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks>
3332
<GenerateDocumentationFile>true</GenerateDocumentationFile>
3433
</PropertyGroup>
3534

0 commit comments

Comments
 (0)