Skip to content

Commit 45a1ffb

Browse files
authored
Merge pull request #5087 from drizzle-team/main-workflows
Workflows
2 parents 378b043 + 6357645 commit 45a1ffb

File tree

5 files changed

+72
-12
lines changed

5 files changed

+72
-12
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
name: Release (feature branch)
22

33
on:
4-
push:
5-
branches-ignore:
6-
- main
7-
pull_request: {}
4+
workflow_call:
5+
secrets:
6+
PLANETSCALE_CONNECTION_STRING:
7+
required: true
8+
NEON_CONNECTION_STRING:
9+
required: true
10+
# NEON_HTTP_CONNECTION_STRING:
11+
# required: true
12+
TIDB_CONNECTION_STRING:
13+
required: true
14+
XATA_API_KEY:
15+
required: true
16+
XATA_BRANCH:
17+
required: true
18+
LIBSQL_REMOTE_URL:
19+
required: true
20+
LIBSQL_REMOTE_TOKEN:
21+
required: true
822

923
jobs:
1024
test:
@@ -328,8 +342,8 @@ jobs:
328342
runs-on: ubuntu-22.04
329343
permissions:
330344
contents: read
331-
id-token: write
332-
# force empty so npm can use OIDC
345+
id-token: write # for OIDC
346+
# force empty so npm can use OIDC
333347
env:
334348
NODE_AUTH_TOKEN: ""
335349
NPM_TOKEN: ""

.github/workflows/release-latest.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
name: Release (latest)
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_call:
5+
secrets:
6+
PLANETSCALE_CONNECTION_STRING:
7+
required: true
8+
NEON_CONNECTION_STRING:
9+
required: true
10+
# NEON_HTTP_CONNECTION_STRING:
11+
# required: true
12+
TIDB_CONNECTION_STRING:
13+
required: true
14+
XATA_API_KEY:
15+
required: true
16+
XATA_BRANCH:
17+
required: true
18+
LIBSQL_REMOTE_URL:
19+
required: true
20+
LIBSQL_REMOTE_TOKEN:
21+
required: true
422

523
jobs:
624
test:
@@ -287,8 +305,8 @@ jobs:
287305

288306
release:
289307
permissions:
290-
contents: read
291-
id-token: write
308+
contents: write # for creating GitHub releases
309+
id-token: write # for OIDC
292310
needs:
293311
- test
294312
- attw

.github/workflows/router.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Router
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
run-feature:
12+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
13+
uses: ./.github/workflows/release-feature-branch.yaml
14+
secrets: inherit
15+
16+
run-latest:
17+
if: github.event_name == 'workflow_dispatch' && github.ref_name == 'main'
18+
uses: ./.github/workflows/release-latest.yaml
19+
secrets: inherit

changelogs/drizzle-kit/0.31.8.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
### Bug fixes
22

3-
- Fixed `algorythm` => `algorithm` typo
3+
- Fixed `algorythm` => `algorithm` typo.
4+
- Fixed external dependencies in build configuration.

drizzle-kit/build.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ const main = async () => {
8484
await tsup.build({
8585
entryPoints: ['./src/index.ts'],
8686
outDir: './dist',
87-
external: ['bun:sqlite'],
87+
external: [
88+
'esbuild',
89+
'drizzle-orm',
90+
...driversPackages,
91+
],
8892
splitting: false,
8993
dts: true,
9094
format: ['cjs', 'esm'],
@@ -105,7 +109,11 @@ const main = async () => {
105109
await tsup.build({
106110
entryPoints: ['./src/api.ts'],
107111
outDir: './dist',
108-
external: ['bun:sqlite'],
112+
external: [
113+
'esbuild',
114+
'drizzle-orm',
115+
...driversPackages,
116+
],
109117
splitting: false,
110118
dts: true,
111119
format: ['cjs', 'esm'],

0 commit comments

Comments
 (0)