There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
ci: improve build.yml
himself6564dac7cc1cf0
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex c17de016d5..204a0d49a0 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -46,6 +46,28 @@ jobs:})throw new Error('not allowed')}+ - name: 'Create Build check'+ uses: actions/github-script@v6+ id: create-check+ # https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ const { data: pull_request } = await github.rest.pulls.get({+ owner: context.repo.owner,+ repo: context.repo.repo,+ pull_number: context.issue.number,+ });+ const { data: check } = await github.rest.checks.create({+ owner: context.repo.owner,+ repo: context.repo.repo,+ head_sha: pull_request.head.sha,+ name: "Build on Pull Request",+ status: "in_progress",+ details_url: process.env.BUILD_URL+ });+ return check.id;- uses: actions/checkout@v3with:ref: ${{ github.event.pull_request.head.sha }}@@ -82,6 +104,37 @@ jobs:- name: Exportrun: yarn export+ - name: Set Failure Check+ uses: actions/github-script@v6+ if: ${{ failure() }}+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ await github.rest.checks.update({+ owner: context.repo.owner,+ repo: context.repo.repo,+ check_run_id: ${{ steps.create-check.outputs.result }},+ status: "completed",+ conclusion: "failure",+ completed_at: new Date().toISOString(),+ });+ - name: Set Success Check+ uses: actions/github-script@v6+ if: ${{ success() }}+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ await github.rest.checks.update({+ owner: context.repo.owner,+ repo: context.repo.repo,+ check_run_id: ${{ steps.create-check.outputs.result }},+ status: "completed",+ conclusion: "success",+ completed_at: new Date().toISOString(),+ });+- name: Upload artifactuses: actions/upload-artifact@v3with:@@ -230,6 +283,28 @@ jobs:- uses: actions/checkout@v3with:ref: ${{ github.event.pull_request.head.sha }}+ - name: 'Create Unit test check'+ uses: actions/github-script@v6+ id: create-check+ # https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ const { data: pull_request } = await github.rest.pulls.get({+ owner: context.repo.owner,+ repo: context.repo.repo,+ pull_number: context.issue.number,+ });+ const { data: check } = await github.rest.checks.create({+ owner: context.repo.owner,+ repo: context.repo.repo,+ head_sha: pull_request.head.sha,+ name: "Unit Test",+ status: "in_progress",+ details_url: process.env.BUILD_URL+ });+ return check.id;- name: Use Node.js LTSuses: actions/setup-node@v3with:@@ -255,6 +330,37 @@ jobs:- name: Unit Testrun: yarn run test:unit:coverage+ - name: Set Failure Check+ uses: actions/github-script@v6+ if: ${{ failure() }}+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ await github.rest.checks.update({+ owner: context.repo.owner,+ repo: context.repo.repo,+ check_run_id: ${{ steps.create-check.outputs.result }},+ status: "completed",+ conclusion: "failure",+ completed_at: new Date().toISOString(),+ });+ - name: Set Success Check+ uses: actions/github-script@v6+ if: ${{ success() }}+ with:+ debug: ${{ secrets.ACTIONS_STEP_DEBUG || false }}+ result-encoding: string+ script: |+ await github.rest.checks.update({+ owner: context.repo.owner,+ repo: context.repo.repo,+ check_run_id: ${{ steps.create-check.outputs.result }},+ status: "completed",+ conclusion: "success",+ completed_at: new Date().toISOString(),+ });+- name: Upload unit test coverage resultsuses: codecov/codecov-action@v3with: