From c64120512145d6c781430b9da500cc29f9fcfe69 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Mon, 6 Jul 2026 14:23:07 +0300 Subject: [PATCH 1/2] make changes for automatic realese on GitHub --- .github/workflows/config.yml | 27 +++++++++++++- README.md | 4 ++ RELEASE.md | 71 ++++++++++++++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 RELEASE.md diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 001b8e473..cf845e8ad 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: @@ -194,11 +194,12 @@ jobs: publish: - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/v') needs: [test-ubuntu, test-windows] runs-on: windows-latest permissions: id-token: write + contents: write steps: - uses: actions/checkout@v5 @@ -236,3 +237,25 @@ jobs: dotnet nuget push "net_connector/SingleStoreConnector.${{ env.CONNECTOR_VERSION }}.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json + + # Extract the notes for this version from docs/VersionHistory.md + - name: Extract release notes + shell: bash + run: | + awk -v ver="### ${CONNECTOR_VERSION}" ' + $0 == ver { flag = 1; next } + /^### / && flag { flag = 0 } + flag { print } + ' docs/VersionHistory.md > release_notes.md + echo "----- release_notes.md -----" + cat release_notes.md + + # Create a draft GitHub Release; the release notes are reviewed and published manually + - name: Create draft GitHub Release + uses: softprops/action-gh-release@v2 + with: + draft: true + prerelease: false + name: ${{ github.ref_name }} + body_path: release_notes.md + files: net_connector/* diff --git a/README.md b/README.md index 6d15c6cab..94e710566 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ dotnet test tests\SingleStoreConnector.Tests To run the side-by-side tests, see [the instructions](tests/README.md). +## Release process + +Releases are automated through GitHub Actions: a new NuGet package is built and published, and a draft GitHub Release is created, whenever a new version tag is pushed to the repository. See [RELEASE.md](RELEASE.md) for the full publishing instructions. + ## Goals The goals of this project are: diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 000000000..beece58f2 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,71 @@ +## Release process + +`SingleStoreConnector` 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. + +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 + +Before creating a release tag: + +* Make sure the release changes are merged into the default branch. +* Make sure CI is passing. +* Update `CONNECTOR_VERSION` in `.github/workflows/config.yml` with the new package version. +* Update the connector version in the `README.md` title. +* Add a section for the new version to `docs/VersionHistory.md` describing the changes in this release. +* Make sure the version tag matches the value of `CONNECTOR_VERSION`. +* The version tag must use the `vX.Y.Z` format. + +For example, if `CONNECTOR_VERSION` is `1.4.0`, the release tag should be `v1.4.0`. + +The version section in `docs/VersionHistory.md` must use a `### X.Y.Z` header that matches `CONNECTOR_VERSION` (for example `### 1.4.0`), because the release workflow extracts that section and uses it to seed the draft GitHub Release notes. + +### 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 connector. +3. Pack the NuGet package. +4. Publish the `SingleStoreConnector` `.nupkg` package to NuGet. +5. Create a draft GitHub Release for the pushed tag, seeding the release notes from the matching section of `docs/VersionHistory.md` and attaching all build artifacts. + +### 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](https://www.nuget.org/packages/SingleStoreConnector). +3. Optionally install the released package locally: + +```bash +dotnet add package SingleStoreConnector --version X.Y.Z +``` + +### Publishing the GitHub Release + +After the workflow creates the draft GitHub Release: + +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. They are pre-filled from the matching `docs/VersionHistory.md` section, so verify they are accurate and complete. +4. Publish the GitHub Release. + +The GitHub Release is intentionally kept as a draft because it requires complete release notes before publishing. + +### 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 c4f96e6713ebea017dc1937a2b55dd6f42ea63b3 Mon Sep 17 00:00:00 2001 From: Olha Kramarenko Date: Mon, 6 Jul 2026 14:51:05 +0300 Subject: [PATCH 2/2] change name --- .github/workflows/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index cf845e8ad..9183dfac5 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -250,12 +250,11 @@ jobs: echo "----- release_notes.md -----" cat release_notes.md - # Create a draft GitHub Release; the release notes are reviewed and published manually - name: Create draft GitHub Release uses: softprops/action-gh-release@v2 with: draft: true prerelease: false - name: ${{ github.ref_name }} + name: Release ${{ github.ref_name }} body_path: release_notes.md files: net_connector/*