Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AFFiNE Core - August Mirror #3

Merged
merged 229 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
229 commits
Select commit Hold shift + click to select a range
ad26102
fix(core): fix scroll block into view (#7712)
EYHN Aug 5, 2024
f108b95
feat(core): tuning for better search (#7713)
EYHN Aug 5, 2024
10deed9
fix: center peek message role (#7723)
donteatfriedrice Aug 5, 2024
3d85564
refactor(component): refactor the implementation of Button and IconBu…
CatsJuice Aug 5, 2024
249f347
feat(component): shortcut style for tooltip (#7721)
CatsJuice Aug 5, 2024
0468355
test(electron): adjust expect timeout for CI (#7707)
pengx17 Aug 5, 2024
9307acf
fix(core): ctrl/cmd + click on add page button opens in new tab (#7701)
pengx17 Aug 5, 2024
741ff23
fix(electron): reload view in tab context menu issue (#7702)
pengx17 Aug 5, 2024
cbdcfdc
fix(electron): duplicate tab views issue (#7703)
pengx17 Aug 5, 2024
c0c5c83
fix(electron): should activate the target tab when closing other tabs…
pengx17 Aug 5, 2024
e3878ae
build(electron): nightly build issue for windows (#7649)
pengx17 Aug 5, 2024
545bd03
fix(core): app height exceeds viewport of mobile (#7706)
L-Sun Aug 5, 2024
bd31c83
fix(core): update outline viewer style (#7641)
L-Sun Aug 5, 2024
51ca765
feat(electron): new tab/split view entries (#7708)
pengx17 Aug 5, 2024
7a66212
chore: bump up oxlint version to v0.7.0 (#7727)
renovate[bot] Aug 5, 2024
561fa46
fix(electron): add i18n setup for shell (#7728)
pengx17 Aug 5, 2024
5f52547
fix(electron): tab title/icon default state (#7731)
pengx17 Aug 5, 2024
51848ff
fix(electron): allow close pinned tab (#7732)
pengx17 Aug 5, 2024
5ab1210
fix(electron): drop indicator position (#7734)
pengx17 Aug 5, 2024
5050418
fix(electron): app ghosting issue when quickly opening new tabs (#7736)
pengx17 Aug 5, 2024
73a6723
fix: use correct user id in forked session (#7710)
darkskygit Aug 5, 2024
6d253c0
fix(core): add favorite folder in menu, adjust empty-page new page bu…
CatsJuice Aug 5, 2024
9cc976c
fix(core): canvas text adapts to input scrolling (#7733)
JimmFly Aug 5, 2024
9f57ed5
fix(electron): find in page input border blink issue (#7737)
pengx17 Aug 5, 2024
e6e9f7d
feat(core): enable feature flag for release (#7738)
EYHN Aug 5, 2024
0acc1bd
chore: cleanup outdated model & upgrade model (#7739)
darkskygit Aug 5, 2024
0d7de67
refactor(electron): reduce the number of listeners for ipc (#7740)
pengx17 Aug 5, 2024
a03831f
fix(electron): whitescreen issue (#7742)
pengx17 Aug 5, 2024
cd4e462
fix(core): transform workspace db when enable cloud (#7744)
EYHN Aug 5, 2024
5938d8b
feat(core): add tooltip and toast for organize operations (#7725)
CatsJuice Aug 6, 2024
873e6fa
chore: bump @blocksuite/icons (#7749)
EYHN Aug 6, 2024
ca7c221
fix(electron): onboarding not shown (#7753)
pengx17 Aug 6, 2024
de7933c
fix: dont limit text block height in chat panel (#7754)
darkskygit Aug 6, 2024
f93743d
fix: reset height after send (#7755)
darkskygit Aug 6, 2024
cc09085
feat(core): make event track great again (#7695)
forehalo Aug 6, 2024
7373e17
chore: bump up fast-xml-parser version to v4.4.1 [SECURITY] (#7752)
renovate[bot] Aug 6, 2024
d0f1bb2
chore(core): replace with new track impl (#7735)
forehalo Aug 6, 2024
5872b88
fix: increase image limit of copilot (#7756)
darkskygit Aug 6, 2024
14669b9
feat: improve continue to chat compatibility (#7757)
darkskygit Aug 6, 2024
601f5fe
chore(core): theme v1.0.2 (#7746)
fundon Aug 6, 2024
744cc54
feat: handle copilot error (#7760)
darkskygit Aug 6, 2024
c2cf331
fix(electron): fix tab view blink issue on open new tab (#7748)
pengx17 Aug 6, 2024
dd74cfe
chore(core): remove old favorite (#7743)
EYHN Aug 7, 2024
96fed60
chore: bump blocksuite (#7751)
EYHN Aug 7, 2024
aee24ff
fix(core): migration favorite appear again (#7768)
EYHN Aug 7, 2024
f6279ee
chore(core): remove outline viewer feature flag (#7770)
L-Sun Aug 7, 2024
f3855c5
fix: can not create a new edgeless doc with "@" on edgeless (#7772)
akumatus Aug 7, 2024
352ceca
fix: chat action button style (#7766)
donteatfriedrice Aug 7, 2024
b5e543c
feat(electron): mouse middle click to close tab (#7759)
pengx17 Aug 7, 2024
74025fc
feat(core): add track events for editor header (#7661)
JimmFly Aug 7, 2024
7edd788
feat(core): add track events for page option (#7664)
JimmFly Aug 7, 2024
67dce9c
feat(core): add track events for page info (#7667)
JimmFly Aug 7, 2024
eb01e76
feat(core): add track events for cmdk (#7668)
JimmFly Aug 7, 2024
e1087a0
fix: remove chat block button flag (#7767)
donteatfriedrice Aug 7, 2024
ae9381c
feat: allow opening new tab for some navigation buttons (#7764)
pengx17 Aug 7, 2024
f35dc74
fix: render ai chat block in embed doc and surface ref (#7747)
donteatfriedrice Aug 7, 2024
75a308a
fix(core): optimize explorer's dnd behaviors (#7769)
CatsJuice Aug 7, 2024
00ee2a8
fix(electron): always show traffic light for mac (#7773)
pengx17 Aug 7, 2024
4e03edb
feat(i18n): add Spanish(Argentina) and Urdu (#7771)
JimmFly Aug 7, 2024
2f0e39b
fix(core): update en.json (#7765)
eltociear Aug 7, 2024
d968cfe
fix(infra): better search result (#7774)
EYHN Aug 7, 2024
c8f4766
fix(component): center button's icon vertically (#7775)
CatsJuice Aug 7, 2024
ff68efb
chore: bump blocksuite (#7776)
L-Sun Aug 7, 2024
58b4358
chore: bump blocksuite (#7779)
L-Sun Aug 7, 2024
025abc6
fix: ai chat block center peek animation (#7781)
donteatfriedrice Aug 8, 2024
f62d305
fix: onboarding stage not shown (#7782)
pengx17 Aug 8, 2024
83244f0
fix(core): trash doc in search result (#7785)
EYHN Aug 8, 2024
f2eafc3
feat(server): authenticate user before ws connected (#7777)
forehalo Aug 8, 2024
03fd23d
fix(core): cloud s subscription resume button's content is blank (#7783)
CatsJuice Aug 8, 2024
c7aabd3
feat(core): highlight doc title in search result (#7786)
EYHN Aug 8, 2024
6ef5675
feat(core): better search result (#7787)
EYHN Aug 8, 2024
b71945c
chore: tracking events for app tabs header (#7778)
pengx17 Aug 8, 2024
fd6e198
chore: bump blocksuite (#7788)
EYHN Aug 8, 2024
7fca130
feat: mid click links to open in new tab (#7784)
pengx17 Aug 8, 2024
8db37e9
feat: cmd click support for journal sidebar (#7792)
pengx17 Aug 8, 2024
3d4fbca
fix(core): can not get chrome version in desktop mode in iOS (#7791)
L-Sun Aug 8, 2024
ffc1217
fix(electron): fix electron global state sync (#7793)
EYHN Aug 8, 2024
450106e
feat(i18n): add Arabic (#7795)
tasnim0tantawi Aug 9, 2024
7efc87b
chore(core): adjust migration text (#7802)
EYHN Aug 9, 2024
c006f3f
fix(core): reduce indexer performance impact (#7803)
EYHN Aug 9, 2024
8563715
chore: adjust i18n (#7800)
JimmFly Aug 9, 2024
b2c00a2
fix(core): typo in migration text (#7804)
EYHN Aug 9, 2024
26fd9a4
feat(component): add autoFocusConfirmButton for confirm-modal (#7801)
CatsJuice Aug 9, 2024
4beedaa
fix(core): delete from folder not work (#7806)
EYHN Aug 9, 2024
009b535
fix(electron): shell should import renderer css in dev (#7805)
pengx17 Aug 9, 2024
fc19180
fix(electron): missing collection name in tab header (#7807)
pengx17 Aug 9, 2024
8209e84
chore(electron): disable parallel execution of electron tests (#7789)
pengx17 Aug 9, 2024
3ad5170
fix(core): hidden open in split view in browser (#7811)
EYHN Aug 9, 2024
d2b0ee4
fix(core): disable blocksuite indexer (#7813)
EYHN Aug 9, 2024
e8d5692
fix(core): sidebar unauthorized user avatar should center vertically …
CatsJuice Aug 9, 2024
f8e5111
fix(core): sidebar renaming menu pos (#7798)
CatsJuice Aug 9, 2024
06d5d97
fix(core): wrong color of ai-subscribe button (#7816)
CatsJuice Aug 9, 2024
eef9afd
chore: bump base version to 0.16.0
forehalo Aug 9, 2024
b993ab0
fix(core): some doc missing in search result (#7818)
EYHN Aug 9, 2024
a579cc7
fix(core): better search result (#7819)
EYHN Aug 9, 2024
d82f4b5
fix: center peek responsiveness update (#7814)
pengx17 Aug 9, 2024
a6169ab
fix: do not use globalShortcut for tab switching (#7827)
pengx17 Aug 11, 2024
4ac9bd7
feat(i18n): fix i18n en-Us & en json english style (#7834)
hwangdev97 Aug 12, 2024
75e02bb
feat(core): rewrite page-mode-switch with RadioGroup, bind hotkey wit…
CatsJuice Aug 12, 2024
6228b27
feat(core): new theme editor poc (#7810)
CatsJuice Aug 12, 2024
9037e66
feat(core): add configuration for experimental features (#7699)
JimmFly Aug 13, 2024
dc41ffb
chore(core): enable mixpanel ignore_dnt flag (#7841)
forehalo Aug 13, 2024
69c64b2
fix(core): checkout event (#7844)
forehalo Aug 13, 2024
d365494
chore: bump up vite-plugin-dts version to v4 (#7762)
renovate[bot] Aug 13, 2024
10f4eaf
chore: bump up vitest-mock-extended version to v2 (#7584)
renovate[bot] Aug 13, 2024
dc51934
feat: bump bs (#7836)
doouding Aug 13, 2024
ccf225c
feat(admin): add self-host setup and user management page (#7537)
JimmFly Aug 13, 2024
1db6b9f
refactor(infra): remove setimmediate (#7821)
EYHN Aug 13, 2024
83a9bee
fix(electron): app got deleted when auto update on windows (#7820)
forehalo Aug 13, 2024
7f7c051
feat(admin): add config page to admin (#7619)
JimmFly Aug 13, 2024
bf6e36d
feat(admin): add server runtime config settings (#7618)
JimmFly Aug 13, 2024
b214003
feat(admin): add prompt management page (#7611)
JimmFly Aug 13, 2024
6dea831
fix(admin): handle error login status (#7646)
JimmFly Aug 13, 2024
0ec1995
fix(admin): organize admin panel (#7840)
forehalo Aug 13, 2024
171a974
fix(server): use timestamp with timezone (#7847)
forehalo Aug 13, 2024
d86f7f4
fix: center peek support open in new tab (#7848)
pengx17 Aug 13, 2024
d4065fe
fix(electron): adjust app-tabs-header styles (#7849)
pengx17 Aug 13, 2024
ba5ba71
chore: add test for all collection and all tag (#7687)
JimmFly Aug 13, 2024
24c34eb
fix: admin panel schema (#7851)
darkskygit Aug 13, 2024
08cc15a
chore: bump up oxlint version to v0.7.1 (#7846)
renovate[bot] Aug 13, 2024
7afba6b
fix(server): prelude should load both local and remote config file (#…
forehalo Aug 14, 2024
0ba5168
fix(server): change password with token should be public (#7855)
forehalo Aug 14, 2024
0152473
chore(admin): organize massive routes (#7857)
forehalo Aug 14, 2024
f69f026
fix(admin): avoid frequent refetch (#7863)
forehalo Aug 14, 2024
05247bb
fix(admin): frequent query requests in the search (#7854)
JimmFly Aug 14, 2024
d5edada
fix(electron): cmd+num not working on mac (#7865)
pengx17 Aug 14, 2024
994b539
fix(admin): user form not dynamically updating as expected (#7858)
JimmFly Aug 14, 2024
05ac3db
feat: bump bs (#7866)
doouding Aug 14, 2024
99e70c9
perf(core): avoid page init when only id required (#7867)
forehalo Aug 14, 2024
ad42418
fix: add hover enter delay for ask ai button (#7872)
donteatfriedrice Aug 14, 2024
42b5ef7
fix(server): redirect to setup page if not initialized (#7871)
forehalo Aug 14, 2024
cd3924b
Revert "fix(server): redirect to setup page if not initialized (#7871)"
forehalo Aug 14, 2024
339c39c
feat: improve prompt management (#7853)
darkskygit Aug 14, 2024
0504d0b
feat(core): init feature flag service (#7856)
EYHN Aug 14, 2024
5094831
feat(core): use emoji as folder icon (#7842)
EYHN Aug 14, 2024
89537e6
refactor(core): separate editor & doc mode (#7873)
EYHN Aug 14, 2024
57449c1
fix(server): redirect to setup page if not initialized (#7875)
forehalo Aug 14, 2024
9192ac4
fix(server): command line nestjs does not have http adapter (#7876)
forehalo Aug 14, 2024
5a2f93f
chore(admin): disable ai settings (#7877)
forehalo Aug 15, 2024
9af0e53
fix(electron): header button not working on linux (#7883)
pengx17 Aug 15, 2024
ba8958f
fix: chat block peek view input reset height (#7884)
donteatfriedrice Aug 15, 2024
624f351
feat(server): make permission a standalone module (#7880)
forehalo Aug 15, 2024
e53dde7
test(server): all instance variants (#7882)
forehalo Aug 15, 2024
e26ba48
feat: update ingress health check (#7888)
darkskygit Aug 15, 2024
dba024d
docs: update LICENSE description (#7869)
Brooooooklyn Aug 15, 2024
b57ce46
chore(electron): adjust log level (#7887)
pengx17 Aug 16, 2024
69c507f
fix(electron): do not use async callback in onBeforeSendHeaders (#7894)
pengx17 Aug 16, 2024
cfc367e
feat(component): add more customizable prop for radio-group with new …
CatsJuice Aug 16, 2024
620d207
chore: bump bs (#7899)
L-Sun Aug 16, 2024
83716c2
feat(core): share in workspace link (#7897)
EYHN Aug 16, 2024
c822594
feat(core): mode in query string (#7904)
EYHN Aug 16, 2024
f324fa4
chore: bump up storybook monorepo to v8 (major) (#6068)
renovate[bot] Aug 16, 2024
23c7324
chore(electron): re-enable sentry for electron (#7898)
pengx17 Aug 17, 2024
e0a91f6
fix(core): tag menu should not accept keyboard shortcut when renaming…
pengx17 Aug 18, 2024
cfac3eb
feat(core): workbench open doc in mode (#7906)
EYHN Aug 19, 2024
4916eea
feat(core): new share menu (#7838)
JimmFly Aug 19, 2024
4a89b1a
fix(electron): adjust tab styles (#7919)
pengx17 Aug 19, 2024
10bea39
chore: bump up all non-major dependencies (#7615)
renovate[bot] Aug 19, 2024
f3930a9
chore(core): remove @storybook/test dep (#7923)
pengx17 Aug 19, 2024
9d42db5
chore: bump electron version (#7922)
pengx17 Aug 19, 2024
152815c
chore: bump up all non-major dependencies (#7921)
renovate[bot] Aug 19, 2024
6b0c398
chore: bump bs (#7914)
Saul-Mirone Aug 20, 2024
682a01e
feat(server): make a singleton global mutex service (#7900)
forehalo Aug 21, 2024
6f9f579
feat(server): make an abstraction for ydoc storage (#7901)
forehalo Aug 21, 2024
e20bdbf
feat(server): make server storage adapters (#7902)
forehalo Aug 21, 2024
b6f46e0
test(server): space adapters (#7903)
forehalo Aug 21, 2024
cfe0677
refactor(core): adapt to new sync api (#7929)
EYHN Aug 21, 2024
a49b92e
feat(core): adjust sidebar style, add github & learn more (#7864)
CatsJuice Aug 21, 2024
c9a1a8c
feat(component): access enviroment in components storybook (#7891)
CatsJuice Aug 21, 2024
a43c34f
fix(core): onboarding switch active state is invisible (#7928)
CatsJuice Aug 21, 2024
182b2fd
chore: bump up electron version to v32 (#7927)
renovate[bot] Aug 21, 2024
23b0db3
feat(component): mobile menu support (#7892)
CatsJuice Aug 21, 2024
b6a3697
chore: bump up oxlint version to v0.7.2 (#7885)
renovate[bot] Aug 21, 2024
483fcfb
chore: bump up @blocksuite/icons version to v2.1.63 (#7845)
renovate[bot] Aug 21, 2024
cf086e4
chore: bump up @keyv/redis version to v3 (#7935)
renovate[bot] Aug 21, 2024
3db95ba
feat(core): use new print pdf api (#7932)
EYHN Aug 21, 2024
5acf1b5
feat: init mobile entry (#7905)
pengx17 Aug 21, 2024
2e2a3af
chore: bump up all non-major dependencies (#7925)
renovate[bot] Aug 22, 2024
03c4d56
feat(component): add slider ui component (#7879)
JimmFly Aug 22, 2024
b333cde
feat(core): init editor setting ui (#7878)
JimmFly Aug 22, 2024
20174b9
feat(core): add custom font family setting (#7924)
JimmFly Aug 22, 2024
5921506
feat(electron): switch to next/previous tab with Ctrl+Tab/Ctrl+Shift+…
pengx17 Aug 22, 2024
2f02f0d
fix(electron): should not send switchSplitView event when clicking on…
pengx17 Aug 22, 2024
4bc4a58
feat(infra): add convenience api to get workspace from doc (#7934)
EYHN Aug 22, 2024
3b727ef
chore: revert breaking change deps (#7949)
darkskygit Aug 22, 2024
5e555b3
fix(electron): adjust app-tabs-header styles (#7947)
pengx17 Aug 22, 2024
b57388f
feat: block slides insert before image load finished (#7948)
darkskygit Aug 22, 2024
920afa7
feat(core): adjust share menu ui (#7931)
JimmFly Aug 23, 2024
49c8a25
chore: bump up @blocksuite/icons version to v2.1.64 (#7945)
renovate[bot] Aug 23, 2024
0b3c7d1
feat: update throttler (#7957)
darkskygit Aug 23, 2024
442a843
chore: bump up all non-major dependencies (#7953)
renovate[bot] Aug 23, 2024
130dc2b
chore: bump up oxlint version to v0.8.0 (#7962)
renovate[bot] Aug 23, 2024
01c9d17
chore: bump up Rust crate sqlx to 0.8 [SECURITY] (#7965)
renovate[bot] Aug 24, 2024
1406696
fix(server): wrong table used for userspace data (#7969)
forehalo Aug 26, 2024
dbcfd24
fix: remove unused variables (#7968)
DonIsaac Aug 26, 2024
3c37006
chore(core): add Display bi-directional links setting row ui (#7954)
JimmFly Aug 26, 2024
bc86f0a
feat(core): editor setting service (#7956)
EYHN Aug 26, 2024
611925f
fix(electron): adjust app-tabs-header styles (#7961)
pengx17 Aug 26, 2024
9ea4aaa
refactor(infra): remove setimmediate (#7975)
EYHN Aug 26, 2024
0209e3f
fix(core): avoid expand runtime config everywhere used (#7972)
forehalo Aug 26, 2024
ecf50a4
chore: bump up happy-dom version to v15 (#7941)
renovate[bot] Aug 27, 2024
e44a948
chore: bump up @marsidev/react-turnstile version to v1 (#7940)
renovate[bot] Aug 27, 2024
67c9c7b
ci: send slack message to channel after deploy (#7889)
Brooooooklyn Aug 27, 2024
6557b5d
fix: native binding (#7985)
darkskygit Aug 27, 2024
10a066a
fix(native): return type casts (#7986)
darkskygit Aug 27, 2024
b8f07ce
chore(core): disable expand database block (#7984)
JimmFly Aug 27, 2024
3e810eb
fix(core): no share page in desktop (#7983)
EYHN Aug 27, 2024
03b2cda
refactor(core): move fontFamily and fullWidthLayout to editor setting…
JimmFly Aug 28, 2024
c53adbc
chore: adjust font menu and slider style (#7989)
JimmFly Aug 28, 2024
09ab922
feat(core): add new doc default mode setting (#7990)
JimmFly Aug 28, 2024
65a8719
feat(core): impl the Doc Info and Bi-Directional Links display settin…
JimmFly Aug 28, 2024
0668568
fix(core): add mobile edit button (#7996)
L-Sun Aug 28, 2024
dde4574
feat: filter out empty workpace in sidebar list (#7960)
darkskygit Aug 28, 2024
4ec45a2
feat(core): add sign in button to shared doc (#7952)
JimmFly Aug 29, 2024
b96ad57
feat(core): import template (#8000)
EYHN Aug 29, 2024
f37051d
feat(core): mobile renderer for explorer (#7942)
CatsJuice Aug 29, 2024
db76780
feat(mobile): mobile index page UI (#7959)
CatsJuice Aug 29, 2024
3ce92f2
feat(mobile): all docs page ui impl (#7976)
CatsJuice Aug 29, 2024
5e8683c
feat(core): add outgoing links to doc info (#7955)
JimmFly Aug 29, 2024
f1bb1fc
feat(mobile): search page ui (#8012)
CatsJuice Aug 29, 2024
f8e6f1f
chore: add mobile scope (#8020)
pengx17 Aug 29, 2024
7ae141b
feat(mobile): add mobile detail page (#7993)
pengx17 Aug 29, 2024
adf314d
fix(mobile): adjust peek view style for mobile (#8003)
pengx17 Aug 29, 2024
f544e69
fix(mobile): modal styles on mobile (#8023)
pengx17 Aug 29, 2024
4ff6fbd
fix(core): hairline boarders for divider (#8021)
pengx17 Aug 30, 2024
f99988a
feat(core): bump blocksuite/icons (#8024)
JimmFly Aug 30, 2024
6989265
chore: bump up valtio version to v2 (#8025)
renovate[bot] Aug 30, 2024
592997b
chore: bump up oxlint version to v0.9.1 (#7974)
renovate[bot] Aug 30, 2024
df34e2c
fix(mobile): close menu when detail page navigate away (#8027)
pengx17 Aug 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ const config = {
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(useAsyncCallback|useDraggable|useDropTarget)',
additionalHooks:
'(useAsyncCallback|useCatchEventCallback|useDraggable|useDropTarget)',
},
],
},
Expand Down
36 changes: 36 additions & 0 deletions .github/actions/cluster-auth/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Auth to Cluster'
description: 'Auth to the GCP Cluster'
inputs:
gcp-project-number:
description: 'GCP project number'
required: true
gcp-project-id:
description: 'GCP project id'
required: true
service-account:
description: 'Service account'
cluster-name:
description: 'Cluster name'
cluster-location:
description: 'Cluster location'

runs:
using: 'composite'
steps:
- id: auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/${{ inputs.gcp-project-number }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions-helm-deploy'
service_account: '${{ inputs.service-account }}'
token_format: 'access_token'
project_id: '${{ inputs.gcp-project-id }}'

- name: 'Setup gcloud cli'
uses: 'google-github-actions/setup-gcloud@v2'
with:
install_components: 'gke-gcloud-auth-plugin'

- id: get-gke-credentials
shell: bash
run: |
gcloud container clusters get-credentials ${{ inputs.cluster-name }} --region ${{ inputs.cluster-location }} --project ${{ inputs.gcp-project-id }}
24 changes: 7 additions & 17 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,14 @@ runs:
shell: bash
run: |
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
- uses: azure/setup-helm@v4
- id: auth
uses: google-github-actions/auth@v2
- name: 'Auth to cluster'
uses: './.github/actions/cluster-auth'
with:
workload_identity_provider: 'projects/${{ inputs.gcp-project-number }}/locations/global/workloadIdentityPools/github-actions/providers/github-actions-helm-deploy'
service_account: '${{ inputs.service-account }}'
token_format: 'access_token'
project_id: '${{ inputs.gcp-project-id }}'

- name: 'Setup gcloud cli'
uses: 'google-github-actions/setup-gcloud@v2'
with:
install_components: 'gke-gcloud-auth-plugin'

- id: get-gke-credentials
shell: bash
run: |
gcloud container clusters get-credentials ${{ inputs.cluster-name }} --region ${{ inputs.cluster-location }} --project ${{ inputs.gcp-project-id }}
gcp-project-number: '${{ inputs.gcp-project-number }}'
gcp-project-id: '${{ inputs.gcp-project-id }}'
service-account: '${{ inputs.service-account }}'
cluster-name: '${{ inputs.cluster-name }}'
cluster-location: '${{ inputs.cluster-location }}'

- name: Deploy
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/setup-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
PACKAGE_VERSION=$(node -p "require('./package.json').version")
TIME_VERSION=$(date +%Y%m%d%H%M)
GIT_SHORT_HASH=$(git rev-parse --short HEAD)
APP_VERSION=$PACKAGE_VERSION-$GIT_SHORT_HASH
APP_VERSION=$PACKAGE_VERSION-nightly-$GIT_SHORT_HASH
fi
echo $APP_VERSION
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion .github/deployment/front/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openresty/openresty:1.25.3.1-0-buster
FROM openresty/openresty:1.25.3.2-0-buster
WORKDIR /app
COPY ./packages/frontend/web/dist ./dist
COPY ./packages/frontend/admin/dist ./admin
Expand Down
2 changes: 1 addition & 1 deletion .github/helm/affine/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: affine
description: AFFiNE cloud chart
type: application
version: 0.0.0
appVersion: "0.15.0"
appVersion: "0.16.0"
2 changes: 1 addition & 1 deletion .github/helm/affine/charts/graphql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: graphql
description: AFFiNE GraphQL server
type: application
version: 0.0.0
appVersion: "0.15.0"
appVersion: "0.16.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0
Expand Down
4 changes: 2 additions & 2 deletions .github/helm/affine/charts/graphql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ spec:
protocol: TCP
livenessProbe:
httpGet:
path: /
path: /info
port: http
initialDelaySeconds: {{ .Values.probe.initialDelaySeconds }}
readinessProbe:
httpGet:
path: /
path: /info
port: http
initialDelaySeconds: {{ .Values.probe.initialDelaySeconds }}
resources:
Expand Down
4 changes: 4 additions & 0 deletions .github/helm/affine/charts/graphql/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "graphql.fullname" . }}
labels:
{{- include "graphql.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
Expand Down
2 changes: 1 addition & 1 deletion .github/helm/affine/charts/sync/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: sync
description: AFFiNE Sync Server
type: application
version: 0.0.0
appVersion: "0.15.0"
appVersion: "0.16.0"
dependencies:
- name: gcloud-sql-proxy
version: 0.0.0
Expand Down
4 changes: 2 additions & 2 deletions .github/helm/affine/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ graphql:
type: ClusterIP
port: 3000
annotations:
cloud.google.com/backend-config: '{"default": "affine-backendconfig"}'
cloud.google.com/backend-config: '{"default": "affine-api-backendconfig"}'

sync:
service:
type: ClusterIP
port: 3010
annotations:
cloud.google.com/backend-config: '{"default": "affine-backendconfig"}'
cloud.google.com/backend-config: '{"default": "affine-api-backendconfig"}'

web:
service:
Expand Down
10 changes: 10 additions & 0 deletions .github/helm/separate-config/backend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: "affine-api-backendconfig"
spec:
healthCheck:
timeoutSec: 1
type: HTTP
requestPath: /info

2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
electron-install: false
electron-install: true
full-cache: true

- name: Download affine.linux-x64-gnu.node
Expand Down
133 changes: 133 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,47 @@ permissions:
packages: 'write'

jobs:
output-prev-version:
name: Output previous version
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.flavor }}
outputs:
prev: ${{ steps.print.outputs.version }}
namespace: ${{ steps.print.outputs.namespace }}
steps:
- uses: actions/checkout@v4
- name: Auth to Cluster
uses: './.github/actions/cluster-auth'
with:
gcp-project-number: ${{ secrets.GCP_PROJECT_NUMBER }}
gcp-project-id: ${{ secrets.GCP_PROJECT_ID }}
service-account: ${{ secrets.GCP_HELM_DEPLOY_SERVICE_ACCOUNT }}
cluster-name: ${{ secrets.GCP_CLUSTER_NAME }}
cluster-location: ${{ secrets.GCP_CLUSTER_LOCATION }}
- name: Output previous version
id: print
run: |
namespace=""
if [ "${{ github.event.inputs.flavor }}" = "canary" ]; then
namespace="dev"
elif [ "${{ github.event.inputs.flavor }}" = "beta" ]; then
namespace="beta"
elif [ "${{ github.event.inputs.flavor }}" = "stable" ]; then
namespace="production"
else
echo "Invalid flavor: ${{ github.event.inputs.flavor }}"
exit 1
fi

echo "Namespace set to: $namespace"

# Get the previous version from the deployment
prev_version=$(kubectl get deployment -n $namespace affine-graphql -o=jsonpath='{.spec.template.spec.containers[0].image}' | awk -F '-' '{print $3}')

echo "Previous version: $prev_version"
echo "version=$prev_version" >> $GITHUB_OUTPUT
echo "namesapce=$namespace" >> $GITHUB_OUTPUT

build-server-image:
name: Build Server Image
uses: ./.github/workflows/build-server-image.yml
Expand Down Expand Up @@ -193,3 +234,95 @@ jobs:
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
STRIPE_WEBHOOK_KEY: ${{ secrets.STRIPE_WEBHOOK_KEY }}
STATIC_IP_NAME: ${{ secrets.STATIC_IP_NAME }}

deploy-done:
needs:
- output-prev-version
- build-frontend-image
- build-server-image
- deploy
if: always()
runs-on: ubuntu-latest
name: Post deploy message
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: toeverything/blocksuite
path: blocksuite
fetch-depth: 0
fetch-tags: true
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
extra-flags: 'workspaces focus @affine/changelog'
electron-install: false
- name: Output deployed info
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
id: set_info
run: |
if [ "${{ github.event.inputs.flavor }}" = "canary" ]; then
echo "deployed_url=https://affine.fail" >> $GITHUB_OUTPUT
elif [ "${{ github.event.inputs.flavor }}" = "beta" ]; then
echo "deployed_url=https://insider.affine.pro" >> $GITHUB_OUTPUT
elif [ "${{ github.event.inputs.flavor }}" = "stable" ]; then
echo "deployed_url=https://app.affine.pro" >> $GITHUB_OUTPUT
else
exit 1
fi
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Post Success event to a Slack channel
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: node ./tools/changelog/index.js
env:
CHANNEL_ID: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
DEPLOYED_URL: ${{ steps.set_info.outputs.deployed_url }}
PREV_VERSION: ${{ needs.output-prev-version.outputs.prev }}
NAMESPACE: ${{ needs.output-prev-version.outputs.namespace }}
DEPLOYMENT: 'SERVER'
FLAVOR: ${{ github.event.inputs.flavor }}
BLOCKSUITE_REPO_PATH: ${{ github.workspace }}/blocksuite
- name: Post Failed event to a Slack channel
id: failed-slack
uses: slackapi/[email protected]
if: ${{ always() && contains(needs.*.result, 'failure') }}
with:
channel-id: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy failed `${{ github.event.inputs.flavor }}`>",
"type": "mrkdwn"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Post Cancel event to a Slack channel
id: cancel-slack
uses: slackapi/[email protected]
if: ${{ always() && contains(needs.*.result, 'cancelled') && !contains(needs.*.result, 'failure') }}
with:
channel-id: ${{ secrets.RELEASE_SLACK_CHNNEL_ID }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Backend deploy cancelled `${{ github.event.inputs.flavor }}`>",
"type": "mrkdwn"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.17.0
Loading