mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-19 15:26:59 +08:00
Compare commits
1 Commits
v2026.2.10
...
v0.11.0-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04e7a9fc14 |
20
.github/actions/setup-version/action.yml
vendored
Normal file
20
.github/actions/setup-version/action.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
name: Setup Version
|
||||||
|
description: 'Setup Version'
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- name: 'Write Version'
|
||||||
|
id: version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ "${{ github.ref_type }}" == "tag" ]; then
|
||||||
|
APP_VERSION=${{ github.ref_name }}
|
||||||
|
else
|
||||||
|
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-nightly-$TIME_VERSION-$GIT_SHORT_HASH
|
||||||
|
fi
|
||||||
|
echo $APP_VERSION
|
||||||
|
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_OUTPUT"
|
||||||
|
./scripts/set-version.sh $APP_VERSION
|
||||||
26
.github/workflows/deploy.yml
vendored
26
.github/workflows/deploy.yml
vendored
@@ -4,10 +4,14 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
flavor:
|
flavor:
|
||||||
description: 'Build type (canary, beta, or stable or internal)'
|
description: 'Select what enverionment to deploy to'
|
||||||
type: string
|
type: choice
|
||||||
default: canary
|
default: canary
|
||||||
|
options:
|
||||||
|
- canary
|
||||||
|
- beta
|
||||||
|
- stable
|
||||||
|
- internal
|
||||||
env:
|
env:
|
||||||
APP_NAME: affine
|
APP_NAME: affine
|
||||||
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
||||||
@@ -18,6 +22,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
with:
|
with:
|
||||||
@@ -36,6 +42,8 @@ jobs:
|
|||||||
environment: ${{ github.event.inputs.flavor }}
|
environment: ${{ github.event.inputs.flavor }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- name: Build Plugins
|
- name: Build Plugins
|
||||||
@@ -67,6 +75,8 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- name: Build Rust
|
- name: Build Rust
|
||||||
@@ -88,6 +98,8 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Version
|
||||||
|
uses: ./.github/actions/setup-version
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
- name: Build Rust
|
- name: Build Rust
|
||||||
@@ -207,12 +219,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: setup deploy version
|
- name: Setup Version
|
||||||
id: version
|
uses: ./.github/actions/setup-version
|
||||||
run: |
|
|
||||||
export APP_VERSION=`node -e "console.log(require('./package.json').version)"`
|
|
||||||
echo $APP_VERSION
|
|
||||||
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Deploy to ${{ github.event.inputs.flavor }}
|
- name: Deploy to ${{ github.event.inputs.flavor }}
|
||||||
uses: ./.github/actions/deploy
|
uses: ./.github/actions/deploy
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user