Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 50 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,45 +16,74 @@ jobs:
with:
fetch-depth: 0 # required for MinVer to read tags

- name: Setup .NET SDKs (8 & 9)
- name: Setup .NET SDKs
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
dotnet-version: 9.0.x
cache: true

- name: Pin SDK
run: |
cat > global.json <<'JSON'
{ "sdk": { "version": "9.0.305", "rollForward": "latestFeature", "allowPrerelease": false } }
JSON
dotnet --info

- name: Restore
run: dotnet restore

- name: Build (Release, all TFMs)
run: dotnet build -c Release -warnAsError

- name: Pack (symbols)
run: >
dotnet pack src/Similarweb.LinqToDB.Firebolt/Similarweb.LinqToDB.Firebolt.csproj
-c Release
-o ./artifacts
/p:ContinuousIntegrationBuild=true
/p:IncludeSymbols=true
/p:SymbolPackageFormat=snupkg
- name: Test (last call)
run: dotnet test -c Release --no-build

- name: Extract changelog for current tag
id: changelog
run: |
tag="${GITHUB_REF_NAME#v}" # v5.0.0-rc.1 -> 5.0.0-rc.1
base="${tag%%-*}" # 5.0.0-rc.1 -> 5.0.0

awk -v ver="$base" '
$0 ~ "^## \\["ver"\\]" {flag=1; next}
/^## \[/ && flag {flag=0}
flag {print}
' CHANGELOG.md > RELEASE_NOTES.md

if [ ! -s RELEASE_NOTES.md ]; then
echo "ERROR: No changelog entry found for $base"
exit 1
fi

echo "release_notes<<EOF" >> $GITHUB_OUTPUT
cat RELEASE_NOTES.md >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Pack (symbols + notes)
run: |
notes=$(sed "s/'/''/g" RELEASE_NOTES.md | tr '\n' ' ')
dotnet pack src/Similarweb.LinqToDB.Firebolt/Similarweb.LinqToDB.Firebolt.csproj \
--no-build \
-c Release \
-o ./artifacts \
/p:PackageReleaseNotes="$notes"

- name: Push to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push "artifacts/*.nupkg" -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json --skip-duplicate
run: >
dotnet nuget push "artifacts/*.nupkg"
-k "$NUGET_API_KEY"
-s https://api.nuget.org/v3/index.json
--skip-duplicate

- name: Push symbols to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: >
dotnet nuget push "artifacts/*.snupkg"
-k "$NUGET_API_KEY"
-s https://api.nuget.org/v3/index.json
--skip-duplicate

- name: Create GitHub Release (attach nupkg + snupkg)
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/*.nupkg
artifacts/*.snupkg
generate_release_notes: true
body: ${{ steps.changelog.outputs.release_notes }}
prerelease: ${{ contains(github.ref_name, '-') }}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/) and
the format of [Keep a Changelog](https://keepachangelog.com/).
## [Unreleased]

## [5.0.0] - 2025-11-24
- Initial release
- Initial implementation of base extension methods
11 changes: 11 additions & 0 deletions Directory.Build.Props
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project>
<PropertyGroup>
<!-- Use tags like v1.2.3 -->
<MinVerTagPrefix>v</MinVerTagPrefix>

<!-- Recommended default MinVer settings -->
<MinVerScheme>SemVer</MinVerScheme>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerAutoIncrement>minor</MinVerAutoIncrement>
</PropertyGroup>
</Project>
17 changes: 0 additions & 17 deletions build/Common.props

This file was deleted.

22 changes: 0 additions & 22 deletions build/Package.props

This file was deleted.

Empty file removed build/versioning/.gitkeep
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Expand Down
Loading