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
38 changes: 36 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches: [master]
tags:
- 'v*'
- 'v[0-9]*.[0-9]*.[0-9]*'
workflow_call:
workflow_dispatch:

Expand Down Expand Up @@ -187,7 +187,11 @@ 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

Expand All @@ -207,3 +211,33 @@ jobs:
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 }}
Comment thread
pmishchenko-ua marked this conversation as resolved.
Comment thread
pmishchenko-ua marked this conversation as resolved.

# 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

- 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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
67 changes: 67 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
## 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.

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 `Version.props` with the new package version.
* Make sure the version tag matches the version in `Version.props`.
* 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`.

### 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.
5. Create a draft GitHub Release for the pushed tag.

### 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
```

### 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.
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.
Loading