chore: change default branch to canary (#4948)

This commit is contained in:
LongYinan
2023-11-15 15:46:50 +08:00
committed by GitHub
parent cc2ade601c
commit e7e617a791
21 changed files with 31 additions and 52 deletions

View File

@@ -58,6 +58,6 @@ body:
label: Are you willing to submit a PR? label: Are you willing to submit a PR?
description: > description: >
(Optional) We encourage you to submit a [Pull Request](https://github.com/toeverything/affine/pulls) (PR) to help improve AFFiNE for everyone, especially if you have a good understanding of how to implement a fix or feature. (Optional) We encourage you to submit a [Pull Request](https://github.com/toeverything/affine/pulls) (PR) to help improve AFFiNE for everyone, especially if you have a good understanding of how to implement a fix or feature.
See the AFFiNE [Contributing Guide](https://github.com/toeverything/affine/blob/master/CONTRIBUTING.md) to get started. See the AFFiNE [Contributing Guide](https://github.com/toeverything/affine/blob/canary/CONTRIBUTING.md) to get started.
options: options:
- label: Yes I'd like to help by submitting a PR! - label: Yes I'd like to help by submitting a PR!

View File

@@ -31,6 +31,6 @@ body:
label: Are you willing to submit a PR? label: Are you willing to submit a PR?
description: > description: >
(Optional) We encourage you to submit a [Pull Request](https://github.com/toeverything/affine/pulls) (PR) to help improve AFFiNE for everyone, especially if you have a good understanding of how to implement a fix or feature. (Optional) We encourage you to submit a [Pull Request](https://github.com/toeverything/affine/pulls) (PR) to help improve AFFiNE for everyone, especially if you have a good understanding of how to implement a fix or feature.
See the AFFiNE [Contributing Guide](https://github.com/toeverything/affine/blob/master/CONTRIBUTING.md) to get started. See the AFFiNE [Contributing Guide](https://github.com/toeverything/affine/blob/canary/CONTRIBUTING.md) to get started.
options: options:
- label: Yes I'd like to help by submitting a PR! - label: Yes I'd like to help by submitting a PR!

View File

@@ -3,7 +3,7 @@ name: Build(Desktop) & Test
on: on:
push: push:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:
@@ -15,7 +15,7 @@ on:
pull_request: pull_request:
merge_group: merge_group:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:

View File

@@ -3,7 +3,7 @@ name: Build(Server) & Test
on: on:
push: push:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:
@@ -15,7 +15,7 @@ on:
pull_request: pull_request:
merge_group: merge_group:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:

View File

@@ -3,7 +3,7 @@ name: Build & Test
on: on:
push: push:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:
@@ -15,7 +15,7 @@ on:
pull_request: pull_request:
merge_group: merge_group:
branches: branches:
- master - canary
- v[0-9]+.[0-9]+.x-staging - v[0-9]+.[0-9]+.x-staging
- v[0-9]+.[0-9]+.x - v[0-9]+.[0-9]+.x
paths-ignore: paths-ignore:

View File

@@ -13,11 +13,11 @@ name: 'CodeQL'
on: on:
push: push:
branches: [master] branches: [canary]
pull_request: pull_request:
merge_group: merge_group:
# The branches below must be a subset of the branches above # The branches below must be a subset of the branches above
branches: [master] branches: [canary]
jobs: jobs:
analyze: analyze:

View File

@@ -2,7 +2,7 @@ name: Release Charts
on: on:
push: push:
branches: [master] branches: [canary]
paths: paths:
- '.github/helm/**/Chart.yml' - '.github/helm/**/Chart.yml'

View File

@@ -6,7 +6,7 @@ on:
- labeled - labeled
- unlabeled - unlabeled
branches: branches:
- master - canary
jobs: jobs:
check_labels: check_labels:

View File

@@ -2,13 +2,13 @@ name: Languages Sync
on: on:
push: push:
branches: ['master'] branches: ['canary']
paths: paths:
- 'packages/frontend/i18n/**' - 'packages/frontend/i18n/**'
- '.github/workflows/languages-sync.yml' - '.github/workflows/languages-sync.yml'
- '!.github/actions/setup-node/action.yml' - '!.github/actions/setup-node/action.yml'
pull_request_target: pull_request_target:
branches: ['master'] branches: ['canary']
paths: paths:
- 'packages/frontend/i18n/**' - 'packages/frontend/i18n/**'
- '.github/workflows/languages-sync.yml' - '.github/workflows/languages-sync.yml'
@@ -23,13 +23,13 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: ./.github/actions/setup-node uses: ./.github/actions/setup-node
- name: Check Language Key - name: Check Language Key
if: github.ref != 'refs/heads/master' if: github.ref != 'refs/heads/canary'
run: yarn workspace @affine/i18n run sync-languages:check run: yarn workspace @affine/i18n run sync-languages:check
env: env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }} TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}
- name: Sync Languages - name: Sync Languages
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/canary'
run: yarn workspace @affine/i18n run sync-languages run: yarn workspace @affine/i18n run sync-languages
env: env:
TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }} TOLGEE_API_KEY: ${{ secrets.TOLGEE_API_KEY }}

View File

@@ -7,7 +7,7 @@ on:
- edited - edited
- synchronize - synchronize
branches: branches:
- master - canary
permissions: permissions:
contents: read contents: read

View File

@@ -7,10 +7,10 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: branches:
- master - canary
pull_request: pull_request:
branches: branches:
- master - canary
paths-ignore: paths-ignore:
- README.md - README.md
- .github/** - .github/**

View File

@@ -3,7 +3,7 @@ name: Release
on: on:
push: push:
branches: branches:
- master - canary
env: env:
BUILD_TYPE: stable BUILD_TYPE: stable
@@ -89,7 +89,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
build-docker: build-docker:
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/canary'
name: Build Docker name: Build Docker
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:

View File

@@ -3,7 +3,7 @@ name: Deploy Cloudflare Worker
on: on:
push: push:
branches: branches:
- master - canary
paths: paths:
- tools/workers/** - tools/workers/**

View File

@@ -220,10 +220,10 @@ See [LICENSE] for details.
[update page]: https://affine.pro/blog?tag=Release%20Note [update page]: https://affine.pro/blog?tag=Release%20Note
[jobs available]: ./docs/jobs.md [jobs available]: ./docs/jobs.md
[latest packages]: https://github.com/toeverything/AFFiNE/pkgs/container/affine-self-hosted [latest packages]: https://github.com/toeverything/AFFiNE/pkgs/container/affine-self-hosted
[contributor license agreement]: https://github.com/toeverything/affine/edit/master/.github/CLA.md [contributor license agreement]: https://github.com/toeverything/affine/edit/canary/.github/CLA.md
[rust-version-icon]: https://img.shields.io/badge/Rust-1.71.0-dea584 [rust-version-icon]: https://img.shields.io/badge/Rust-1.71.0-dea584
[stars-icon]: https://img.shields.io/github/stars/toeverything/AFFiNE.svg?style=flat&logo=github&colorB=red&label=stars [stars-icon]: https://img.shields.io/github/stars/toeverything/AFFiNE.svg?style=flat&logo=github&colorB=red&label=stars
[codecov]: https://codecov.io/gh/toeverything/affine/branch/master/graphs/badge.svg?branch=master [codecov]: https://codecov.io/gh/toeverything/affine/branch/canary/graphs/badge.svg?branch=canary
[node-version-icon]: https://img.shields.io/badge/node-%3E=18.16.1-success [node-version-icon]: https://img.shields.io/badge/node-%3E=18.16.1-success
[typescript-version-icon]: https://img.shields.io/github/package-json/dependency-version/toeverything/affine/dev/typescript [typescript-version-icon]: https://img.shields.io/github/package-json/dependency-version/toeverything/affine/dev/typescript
[react-version-icon]: https://img.shields.io/github/package-json/dependency-version/toeverything/AFFiNE/react?filename=packages%2Ffrontend%2Fcore%2Fpackage.json&color=rgb(97%2C228%2C251) [react-version-icon]: https://img.shields.io/github/package-json/dependency-version/toeverything/AFFiNE/react?filename=packages%2Ffrontend%2Fcore%2Fpackage.json&color=rgb(97%2C228%2C251)

View File

@@ -13,7 +13,7 @@ Use the table of contents icon on the top left corner of this document to get to
Currently we have two versions of AFFiNE: Currently we have two versions of AFFiNE:
- [AFFiNE Pre-Alpha](https://livedemo.affine.pro/). This version uses the branch `Pre-Alpha`, it is no longer actively developed but contains some different functions and features. - [AFFiNE Pre-Alpha](https://livedemo.affine.pro/). This version uses the branch `Pre-Alpha`, it is no longer actively developed but contains some different functions and features.
- [AFFiNE Alpha](https://pathfinder.affine.pro/). This version uses the `master` branch, this is the latest version under active development. - [AFFiNE Alpha](https://pathfinder.affine.pro/). This version uses the `canary` branch, this is the latest version under active development.
To get an overview of the project, read the [README](../README.md). Here are some resources to help you get started with open source contributions: To get an overview of the project, read the [README](../README.md). Here are some resources to help you get started with open source contributions:

View File

@@ -11,7 +11,7 @@ The AFFiNE core team gives release authorization. And also have the following re
## How to make a release? ## How to make a release?
Before releasing, ensure you have the latest version of the `master` branch. Before releasing, ensure you have the latest version of the `canary` branch.
And Read the semver specification to understand how to version your release. https://semver.org And Read the semver specification to understand how to version your release. https://semver.org
@@ -21,13 +21,13 @@ And Read the semver specification to understand how to version your release. htt
./scripts/set-version.sh 0.5.4-canary.5 ./scripts/set-version.sh 0.5.4-canary.5
``` ```
### 2. Commit changes and push to `master` ### 2. Commit changes and push to `canary`
```shell ```shell
git add . git add .
# vx.y.z-canary.n # vx.y.z-canary.n
git commit -m "v0.5.4-canary.5" git commit -m "v0.5.4-canary.5"
git push origin master git push origin canary
``` ```
### 3. Create a release action ### 3. Create a release action

View File

@@ -11,7 +11,7 @@
} }
}, },
"affected": { "affected": {
"defaultBase": "master" "defaultBase": "canary"
}, },
"namedInputs": { "namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"], "default": ["{projectRoot}/**/*", "sharedGlobals"],

View File

@@ -38,7 +38,6 @@
"test": "vitest --run", "test": "vitest --run",
"test:ui": "vitest --ui", "test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage", "test:coverage": "vitest run --coverage",
"notify": "node scripts/notify.mjs",
"circular": "madge --circular --ts-config ./tsconfig.json ./packages/frontend/core/src/pages/**/*.tsx ./packages/frontend/core/src/index.tsx ./packages/frontend/electron/src/*/index.ts", "circular": "madge --circular --ts-config ./tsconfig.json ./packages/frontend/core/src/pages/**/*.tsx ./packages/frontend/core/src/index.tsx ./packages/frontend/electron/src/*/index.ts",
"typecheck": "tsc -b tsconfig.json --diagnostics", "typecheck": "tsc -b tsconfig.json --diagnostics",
"postinstall": "node ./scripts/check-version.mjs && yarn i18n-codegen gen && yarn husky install" "postinstall": "node ./scripts/check-version.mjs && yarn i18n-codegen gen && yarn husky install"

View File

@@ -35,4 +35,4 @@ downloadBinary(yDoc.guid).then(blob => {
## LICENSE ## LICENSE
[MIT](https://github.com/toeverything/AFFiNE/blob/master/LICENSE-MIT) [MIT](https://github.com/toeverything/AFFiNE/blob/canary/LICENSE-MIT)

View File

@@ -1,20 +0,0 @@
const STAGE_HOST = 'https://nightly.affine.pro/';
if (['master', 'develop'].includes(process.env.CF_PAGES_BRANCH)) {
const message = `Daily builds: New deployment of version ${process.env.CF_PAGES_COMMIT_SHA} was deploy: [nightly](${STAGE_HOST}) / [internal](${process.env.CF_PAGES_URL})`;
const url = `https://api.telegram.org/bot${process.env.BOT_TOKEN}/sendMessage`;
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
chat_id: process.env.CHAT_ID,
text: message,
parse_mode: 'Markdown',
disable_notification: true,
}),
})
.then(r => r.json())
.then(console.log);
}

View File

@@ -15,4 +15,4 @@ If you find a bug, please file an issue on [GitHub](https://github.com/toeveryth
## Contributing ## Contributing
We welcome contributions from the community! [Get started here](https://github.com/toeverything/AFFiNE/blob/master/docs/BUILDING.md) We welcome contributions from the community! [Get started here](https://github.com/toeverything/AFFiNE/blob/canary/docs/BUILDING.md)