From dd8701dc831b6775db1dad62bd2122ae4e8b28e2 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Tue, 23 Jun 2026 17:56:17 +0300 Subject: [PATCH 1/6] try testing automatic publishing (obtain temporary API key) --- .github/workflows/config.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 0c3362603..2babe53f2 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -187,23 +187,23 @@ jobs: publish: runs-on: windows-latest needs: [test-ubuntu, test-windows] - if: startsWith(github.ref, 'refs/tags/') + if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/checkout@v4 - - - name: Install .NET - uses: actions/setup-dotnet@v4 + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@v1 + id: login with: - dotnet-version: ${{ env.DOTNET_VERSION }} + user: ${{ secrets.NUGET_USER }} - - name: Build - run: dotnet build .\src\EFCore.SingleStore\EFCore.SingleStore.csproj -c Release - - - name: Pack NuGet - run: dotnet pack .\src\EFCore.SingleStore\EFCore.SingleStore.csproj -c Release -o efcore_provider + - name: Confirm NuGet login worked + shell: bash + env: + NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }} + run: | + if [ -z "$NUGET_API_KEY" ]; then + echo "NuGet login did not return a temporary API key." + exit 1 + fi - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: efcore-provider - path: efcore_provider/ + echo "NuGet Trusted Publishing login succeeded." + echo "Temporary API key was returned, but it was not printed." From 2f68eb5b48557a0b079910c1750c1e4b9ff8b0e8 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Tue, 23 Jun 2026 18:04:51 +0300 Subject: [PATCH 2/6] fix a bug + make it faster to check --- .github/workflows/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 2babe53f2..8c5ff5b8a 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -186,8 +186,10 @@ jobs: publish: runs-on: windows-latest - needs: [test-ubuntu, test-windows] if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') + permissions: + id-token: write + steps: - name: NuGet login (OIDC → temp API key) uses: NuGet/login@v1 From f7c18696706e5c1916a3f2f7950af473673a32b6 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Tue, 23 Jun 2026 18:17:23 +0300 Subject: [PATCH 3/6] update to a proper publish job --- .github/workflows/config.yml | 41 ++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 8c5ff5b8a..ba45e5318 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -186,26 +186,41 @@ jobs: publish: runs-on: windows-latest - if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') + needs: [test-ubuntu, test-windows] + if: startsWith(github.ref, 'refs/tags/') permissions: id-token: write steps: + - uses: actions/checkout@v4 + + - name: Install .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build + run: dotnet build .\src\EFCore.SingleStore\EFCore.SingleStore.csproj -c Release + + - name: Pack NuGet + run: dotnet pack .\src\EFCore.SingleStore\EFCore.SingleStore.csproj -c Release -o efcore_provider + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: efcore-provider + path: efcore_provider/ + + # Get a short-lived NuGet API key - name: NuGet login (OIDC → temp API key) uses: NuGet/login@v1 id: login with: user: ${{ secrets.NUGET_USER }} - - name: Confirm NuGet login worked - shell: bash - env: - NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }} - run: | - if [ -z "$NUGET_API_KEY" ]; then - echo "NuGet login did not return a temporary API key." - exit 1 - fi - - echo "NuGet Trusted Publishing login succeeded." - echo "Temporary API key was returned, but it was not printed." + # Push the package + - name: NuGet push + run: > + dotnet nuget push "efcore_provider/*.nupkg" + --api-key ${{steps.login.outputs.NUGET_API_KEY}} + --source https://api.nuget.org/v3/index.json From d070522953fd568804963922edb356d9e858d30c Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Wed, 24 Jun 2026 13:55:31 +0300 Subject: [PATCH 4/6] add RELEASE.md --- RELEASE.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..4f7cf12e6 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,66 @@ +## Release process + +`EntityFrameworkCore.SingleStore` releases are automated through GitHub Actions. A new NuGet package is built and published automatically when a new version tag is pushed to the GitHub repository. + +GitHub Releases are created manually after the package is published, because the release notes must be reviewed and added manually. + +### Prerequisites + +Before creating a release tag: + +* Make sure the release changes are merged into the default branch. +* Make sure CI is passing. +* Update `Version.props` with the new package version. +* Make sure the version tag matches the version in `Version.props`. +* The version tag should use the `vX.Y.Z` format. + +For example, if `Version.props` contains version `9.0.1`, the release tag should be `v9.0.1`. + +### Creating a release + +From the default branch, run: + +```bash +git checkout master +git pull origin master +git tag vX.Y.Z +git push origin vX.Y.Z +``` + +Replace `X.Y.Z` with the version being released. + +After the tag is pushed, GitHub Actions will automatically: + +1. Run the test workflows. +2. Build the EF Core provider package. +3. Pack the NuGet package. +4. Publish the `.nupkg` package to NuGet. + +### Verifying the NuGet release + +After the release workflow finishes successfully: + +1. Check that the GitHub Actions workflow completed without errors. +2. Verify that the new package version is available on NuGet. +3. Optionally install the released package locally: + +```bash +dotnet add package EntityFrameworkCore.SingleStore --version X.Y.Z +``` + +### Creating the GitHub Release + +After the NuGet package is published, create the GitHub Release manually: + +1. Open the repository's **Releases** page. +2. Create a new release for the pushed tag, for example `vX.Y.Z`. +3. Add the release title and release notes. +4. Publish the GitHub Release. + +The GitHub Release is intentionally manual because it requires complete release notes. + +### Failed releases + +If the release workflow fails before publishing to NuGet, fix the issue and rerun the workflow or recreate the tag as needed. + +If the package was already published to NuGet, do not reuse the same version number. NuGet package versions are immutable, so a fix must be released with a new version. From 34178ff0bd5dda262133e603a8f6e03f3a17c64e Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Wed, 24 Jun 2026 14:14:09 +0300 Subject: [PATCH 5/6] add RELEASE mention in README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index cbfcf36b1..3e5301a8b 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,11 @@ optionsBuilder.UseSingleStore( ``` The configured timeout must be greater than zero and cannot exceed `TimeSpan.FromSeconds(int.MaxValue)`. Internally, this option is stored through `WithMigrationLockTimeout(...)`, while the public configuration API is `MigrationLockTimeout(TimeSpan timeout)`. + +## Release process + +The `EntityFrameworkCore.SingleStore` release process is automated through GitHub Actions. See [Release Instructions](RELEASE.md) for instructions on publishing a new release. + ## License [MIT](https://github.com/memsql/SingleStore.EntityFrameworkCore/blob/master/LICENSE) From 1a79689ca08f358cd0a49283d7fc8eb718cb9df5 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Wed, 24 Jun 2026 15:34:07 +0300 Subject: [PATCH 6/6] resolve comments --- .github/workflows/config.yml | 21 +++++++++++++++++++-- RELEASE.md | 17 +++++++++-------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index ba45e5318..ca2ad932b 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -6,7 +6,7 @@ on: push: branches: [master] tags: - - 'v*' + - 'v[0-9]*.[0-9]*.[0-9]*' workflow_call: workflow_dispatch: @@ -187,9 +187,10 @@ jobs: publish: runs-on: windows-latest needs: [test-ubuntu, test-windows] - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/v') permissions: id-token: write + contents: write steps: - uses: actions/checkout@v4 @@ -224,3 +225,19 @@ jobs: dotnet nuget push "efcore_provider/*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json + + - name: Create draft GitHub Release + uses: softprops/action-gh-release@v2 + with: + name: Release ${{ github.ref_name }} + body: | + ## EntityFrameworkCore.SingleStore ${{ github.ref_name }} + + This is a draft release for EntityFrameworkCore.SingleStore. + + Please review and complete the release notes before publishing this GitHub Release. + draft: true + prerelease: false + generate_release_notes: true + files: | + efcore_provider/*.nupkg diff --git a/RELEASE.md b/RELEASE.md index 4f7cf12e6..de60a1974 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,7 +2,7 @@ `EntityFrameworkCore.SingleStore` releases are automated through GitHub Actions. A new NuGet package is built and published automatically when a new version tag is pushed to the GitHub repository. -GitHub Releases are created manually after the package is published, because the release notes must be reviewed and added manually. +A draft GitHub Release is also created automatically. The release remains a draft because the release notes must be reviewed and completed manually before publishing. ### Prerequisites @@ -12,7 +12,7 @@ Before creating a release tag: * Make sure CI is passing. * Update `Version.props` with the new package version. * Make sure the version tag matches the version in `Version.props`. -* The version tag should use the `vX.Y.Z` format. +* The version tag must use the `vX.Y.Z` format. For example, if `Version.props` contains version `9.0.1`, the release tag should be `v9.0.1`. @@ -35,6 +35,7 @@ After the tag is pushed, GitHub Actions will automatically: 2. Build the EF Core provider package. 3. Pack the NuGet package. 4. Publish the `.nupkg` package to NuGet. +5. Create a draft GitHub Release for the pushed tag. ### Verifying the NuGet release @@ -48,16 +49,16 @@ After the release workflow finishes successfully: dotnet add package EntityFrameworkCore.SingleStore --version X.Y.Z ``` -### Creating the GitHub Release +### Publishing the GitHub Release -After the NuGet package is published, create the GitHub Release manually: +After the workflow creates the draft GitHub Release: -1. Open the repository's **Releases** page. -2. Create a new release for the pushed tag, for example `vX.Y.Z`. -3. Add the release title and release notes. +1. Open the repository's Releases page. +2. Open the draft release for the pushed tag, for example `vX.Y.Z`. +3. Review and complete the release notes. 4. Publish the GitHub Release. -The GitHub Release is intentionally manual because it requires complete release notes. +The GitHub Release is intentionally kept as a draft because it requires complete release notes before publishing. ### Failed releases