mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
ci: remove publish job (#5135)
This commit is contained in:
165
.github/workflows/release.yml
vendored
165
.github/workflows/release.yml
vendored
@@ -1,165 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- canary
|
|
||||||
|
|
||||||
env:
|
|
||||||
BUILD_TYPE: stable
|
|
||||||
APP_NAME: affine
|
|
||||||
COVERAGE: false
|
|
||||||
DISTRIBUTION: browser
|
|
||||||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Try publishing npm@latest release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
- name: Try publishing to NPM
|
|
||||||
run: ./scripts/publish.sh
|
|
||||||
env:
|
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
||||||
|
|
||||||
build-core:
|
|
||||||
name: Build @affine/core
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: development
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
- name: Build Plugins
|
|
||||||
run: yarn run build:plugins
|
|
||||||
- name: Build Core
|
|
||||||
run: yarn nx build @affine/core
|
|
||||||
- name: Upload core artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: core
|
|
||||||
path: ./packages/frontend/core/dist
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
build-server:
|
|
||||||
name: Build Server
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: development
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
with:
|
|
||||||
electron-install: false
|
|
||||||
- name: Build Server
|
|
||||||
run: yarn nx build @affine/server
|
|
||||||
- name: Upload server dist
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: server-dist
|
|
||||||
path: ./packages/backend/server/dist
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
build-storage:
|
|
||||||
name: Build Storage
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
RUSTFLAGS: '-C debuginfo=1'
|
|
||||||
environment: development
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: ./.github/actions/setup-node
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: ./.github/actions/build-rust
|
|
||||||
with:
|
|
||||||
target: 'x86_64-unknown-linux-gnu'
|
|
||||||
package: '@affine/storage'
|
|
||||||
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
||||||
- name: Upload storage.node
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: storage.node
|
|
||||||
path: ./packages/backend/storage/storage.node
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
build-docker:
|
|
||||||
if: github.ref == 'refs/heads/canary'
|
|
||||||
name: Build Docker
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build-server
|
|
||||||
- build-core
|
|
||||||
- build-storage
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Download core artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: core
|
|
||||||
path: ./packages/frontend/core/dist
|
|
||||||
- name: Download server dist
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: server-dist
|
|
||||||
path: ./packages/backend/server/dist
|
|
||||||
- name: Download storage.node
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: storage.node
|
|
||||||
path: ./packages/backend/server
|
|
||||||
- name: Setup Git short hash
|
|
||||||
run: |
|
|
||||||
echo "GIT_SHORT_HASH=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
logout: false
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Build front Dockerfile
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
pull: true
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
provenance: true
|
|
||||||
file: .github/deployment/front/Dockerfile
|
|
||||||
tags: ghcr.io/toeverything/affine-front:${{ env.GIT_SHORT_HASH }},ghcr.io/toeverything/affine-front:latest
|
|
||||||
|
|
||||||
# setup node without cache configuration
|
|
||||||
# Prisma cache is not compatible with docker build cache
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
registry-url: https://npm.pkg.github.com
|
|
||||||
scope: '@toeverything'
|
|
||||||
|
|
||||||
- name: Install Node.js dependencies
|
|
||||||
run: yarn workspaces focus @affine/server --production
|
|
||||||
|
|
||||||
- name: Generate Prisma client
|
|
||||||
run: yarn workspace @affine/server prisma generate
|
|
||||||
|
|
||||||
- name: Build graphql Dockerfile
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
pull: true
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
provenance: true
|
|
||||||
file: .github/deployment/node/Dockerfile
|
|
||||||
tags: ghcr.io/toeverything/affine-graphql:${{ env.GIT_SHORT_HASH }},ghcr.io/toeverything/affine-graphql:latest
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
packages=(
|
|
||||||
"y-indexeddb"
|
|
||||||
"y-provider"
|
|
||||||
"infra"
|
|
||||||
"sdk"
|
|
||||||
)
|
|
||||||
|
|
||||||
for package in "${packages[@]}"; do
|
|
||||||
yarn nx build $package
|
|
||||||
cd "packages/common/$package"
|
|
||||||
|
|
||||||
if [ "$NIGHTLY" = "true" ]; then
|
|
||||||
yarn npm publish --no-git-checks --tag nightly
|
|
||||||
else
|
|
||||||
yarn npm publish
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd ../../../
|
|
||||||
done
|
|
||||||
Reference in New Issue
Block a user