diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8ee8b9a..ec418da 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,4 +76,8 @@ jobs: set -euo pipefail git tag "v$VERSION" git push origin "v$VERSION" - gh release create "v$VERSION" --generate-notes --title "v$VERSION" + if [[ "$VERSION" == *-* ]]; then + gh release create "v$VERSION" --generate-notes --title "v$VERSION" --prerelease + else + gh release create "v$VERSION" --generate-notes --title "v$VERSION" + fi diff --git a/packages/workflows/src/rivetkit/driver.ts b/packages/workflows/src/rivetkit/driver.ts index a174fd4..9a37065 100644 --- a/packages/workflows/src/rivetkit/driver.ts +++ b/packages/workflows/src/rivetkit/driver.ts @@ -185,10 +185,11 @@ class WorkflowStorage { if (includeState) { await this.#db.transaction(commit, { + name: "workflow-batch-state", experimental: { includeState: true }, }); } else { - await this.#db.transaction(commit); + await this.#db.transaction(commit, { name: "workflow-batch" }); } } } diff --git a/packages/workflows/tests/rivetkit/driver.test.ts b/packages/workflows/tests/rivetkit/driver.test.ts index 83b755b..25e66d2 100644 --- a/packages/workflows/tests/rivetkit/driver.test.ts +++ b/packages/workflows/tests/rivetkit/driver.test.ts @@ -55,6 +55,7 @@ describe("RivetKit workflow driver", () => { await driver.batch([write(), write(3, 4)]); expect(db.transaction).toHaveBeenCalledOnce(); expect(db.transaction.mock.calls[0]?.[1]).toEqual({ + name: "workflow-batch-state", experimental: { includeState: true }, }); }); @@ -63,7 +64,9 @@ describe("RivetKit workflow driver", () => { const { controlDriver, db } = createSubject(); await controlDriver.batch([write()]); expect(db.transaction).toHaveBeenCalledOnce(); - expect(db.transaction.mock.calls[0]?.[1]).toBeUndefined(); + expect(db.transaction.mock.calls[0]?.[1]).toEqual({ + name: "workflow-batch", + }); }); test("reads, lists, and deletes byte-compatible rows", async () => {