mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
Merge branch 'master' of github.com:toeverything/AFFINE-pathfinder into feat/layout
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Build
|
||||
name: Build LiveDemo Version
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -0,0 +1,123 @@
|
||||
name: Build LiveDemo Test Version
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Custom Tag. Set nightly-latest will publish to development."
|
||||
required: false
|
||||
type: string
|
||||
|
||||
# Cancels all previous workflow runs for pull requests that have not completed.
|
||||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
||||
concurrency:
|
||||
# The concurrency group contains the workflow name and the branch name for
|
||||
# pull requests or the commit hash for any other events.
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Lint nad Build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 'latest'
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
|
||||
- run: node scripts/module-resolve/ci.js
|
||||
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
.next/cache
|
||||
# Generate a new cache whenever packages or source files change.
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
# If source files changed but packages didn't, rebuild from a prior cache.
|
||||
restore-keys: |
|
||||
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_AUTH_TOKEN }}
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
pnpm lint --max-warnings=0
|
||||
|
||||
# - name: Test
|
||||
# run: pnpm test
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Export
|
||||
run: pnpm export
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: ./packages/app/out
|
||||
|
||||
push_to_registry:
|
||||
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}-testing
|
||||
IMAGE_TAG: canary-${{ github.sha }}
|
||||
# IMAGE_TAG_LATEST: nightly-latest
|
||||
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: artifact
|
||||
path: packages/app/out/
|
||||
|
||||
- name: Log in to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
${{ env.IMAGE_TAG }}
|
||||
${{ inputs.tag || github.ref_name }}
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
file: ./.github/deployment/Dockerfile
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -10,9 +10,9 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blocksuite/blocks": "^0.2.12",
|
||||
"@blocksuite/editor": "^0.2.12",
|
||||
"@blocksuite/store": "^0.2.12",
|
||||
"@blocksuite/blocks": "^0.2.14",
|
||||
"@blocksuite/editor": "^0.2.14",
|
||||
"@blocksuite/store": "^0.2.14",
|
||||
"@emotion/css": "^11.10.0",
|
||||
"@emotion/react": "^11.10.4",
|
||||
"@emotion/server": "^11.10.0",
|
||||
|
||||
Generated
+15
-15
@@ -18,9 +18,9 @@ importers:
|
||||
|
||||
packages/app:
|
||||
specifiers:
|
||||
'@blocksuite/blocks': ^0.2.12
|
||||
'@blocksuite/editor': ^0.2.12
|
||||
'@blocksuite/store': ^0.2.12
|
||||
'@blocksuite/blocks': ^0.2.14
|
||||
'@blocksuite/editor': ^0.2.14
|
||||
'@blocksuite/store': ^0.2.14
|
||||
'@emotion/css': ^11.10.0
|
||||
'@emotion/react': ^11.10.4
|
||||
'@emotion/server': ^11.10.0
|
||||
@@ -48,9 +48,9 @@ importers:
|
||||
react-dom: 18.2.0
|
||||
typescript: 4.8.3
|
||||
dependencies:
|
||||
'@blocksuite/blocks': 0.2.12
|
||||
'@blocksuite/editor': 0.2.12
|
||||
'@blocksuite/store': 0.2.12
|
||||
'@blocksuite/blocks': 0.2.14
|
||||
'@blocksuite/editor': 0.2.14
|
||||
'@blocksuite/store': 0.2.14
|
||||
'@emotion/css': 11.10.0
|
||||
'@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34
|
||||
'@emotion/server': 11.10.0_@emotion+css@11.10.0
|
||||
@@ -166,10 +166,10 @@ packages:
|
||||
to-fast-properties: 2.0.0
|
||||
dev: false
|
||||
|
||||
/@blocksuite/blocks/0.2.12:
|
||||
resolution: {integrity: sha512-hKW0ofkcY2pNbI/EfYKuOGw23R/GUSx2zedo59NZzCHm6iitKK9omEigFK25CxMbmlY5dPrswo31QQPgu6u+7w==}
|
||||
/@blocksuite/blocks/0.2.14:
|
||||
resolution: {integrity: sha512-m/nTOpXuwFHZBgtZBdokW6Kkb3V+h2BtptRZQ19Hvm2N8PPiTZp3sUOyy6tHiEeOva06NcegDPvnXMhZo0enDQ==}
|
||||
dependencies:
|
||||
'@blocksuite/store': 0.2.12
|
||||
'@blocksuite/store': 0.2.14
|
||||
hotkeys-js: 3.10.0
|
||||
lit: 2.4.0
|
||||
quill: 1.3.7
|
||||
@@ -180,11 +180,11 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@blocksuite/editor/0.2.12:
|
||||
resolution: {integrity: sha512-exGUJ9zBdWpPwCrFPv+u7F+xMlCksif3hRCT5dPWYt8LDVi5CcHuS5uZ0nUEgi0uSDgXyohSgOVaPl8GGYnXzA==}
|
||||
/@blocksuite/editor/0.2.14:
|
||||
resolution: {integrity: sha512-CUbGAnIGffy0Pjjg7HenDNiMLMYxuiXfKumEUlKBs+GSYP+wZ16zsk2UXFEgKG+INXEPwbgTllpo/+rOvKmT2Q==}
|
||||
dependencies:
|
||||
'@blocksuite/blocks': 0.2.12
|
||||
'@blocksuite/store': 0.2.12
|
||||
'@blocksuite/blocks': 0.2.14
|
||||
'@blocksuite/store': 0.2.14
|
||||
lit: 2.4.0
|
||||
marked: 4.1.1
|
||||
turndown: 7.1.1
|
||||
@@ -194,8 +194,8 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@blocksuite/store/0.2.12:
|
||||
resolution: {integrity: sha512-dtiC95NP/dZq23nuP4/KhMQvVTSt8BvpiL86pzZ54YxvLhOga2dFmXzChEZlo3aYbJcBm4Nv+UbZRV8jylTq3w==}
|
||||
/@blocksuite/store/0.2.14:
|
||||
resolution: {integrity: sha512-J9myq7NdnFI2bRQ5WlwUZwlmqiUToS9Y35NhwdyFIJZvRPfZ90e09iggUZL5lRbxcEC2/XfM4hWd9GedgTdzgw==}
|
||||
dependencies:
|
||||
lib0: 0.2.52
|
||||
y-protocols: 1.0.5
|
||||
|
||||
Reference in New Issue
Block a user