Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

👷 ci: publish desktop stable/beta GitHub Releases as lobe-tsukumo (#19784)

Innei704689aaa69c
diff --git a/.github/workflows/release-desktop-beta.yml b/.github/workflows/release-desktop-beta.yml
index 94c13b9e7d6..f888948b654 100644
--- a/.github/workflows/release-desktop-beta.yml
+++ b/.github/workflows/release-desktop-beta.yml
@@ -274,6 +274,12 @@ jobs:
permissions:
contents: write
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
# 下载合并后的构建产物
- name: Download merged artifacts
uses: actions/download-artifact@v7
@@ -301,14 +307,22 @@ jobs:
release/*.rpm*
release/*.tar.gz*
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
publish-renderer-base:
needs: [check-beta, merge-mac-files]
name: Publish Beta Renderer Base
runs-on: ubuntu-latest
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
- uses: actions/checkout@v7
+ with:
+ token: ${{ steps.app-token.outputs.token }}
- uses: ./.github/actions/desktop-publish-s3
with:
channel: beta
diff --git a/.github/workflows/release-desktop-canary.yml b/.github/workflows/release-desktop-canary.yml
index 028e20dc4f4..c1ec2a4997b 100644
--- a/.github/workflows/release-desktop-canary.yml
+++ b/.github/workflows/release-desktop-canary.yml
@@ -483,7 +483,15 @@ jobs:
name: Publish to S3
runs-on: ubuntu-latest
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
- uses: actions/checkout@v7
+ with:
+ token: ${{ steps.app-token.outputs.token }}
- uses: ./.github/actions/desktop-publish-s3
with:
channel: canary
@@ -505,11 +513,20 @@ jobs:
permissions:
contents: write
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
- uses: actions/checkout@v7
+ with:
+ token: ${{ steps.app-token.outputs.token }}
- name: Delete old canary GitHub releases
uses: actions/github-script@v8
with:
+ github-token: ${{ steps.app-token.outputs.token }}
script: |
const { data: releases } = await github.rest.repos.listReleases({
owner: context.repo.owner,
diff --git a/.github/workflows/release-desktop-stable.yml b/.github/workflows/release-desktop-stable.yml
index cc36684840c..f1f1becc4f0 100644
--- a/.github/workflows/release-desktop-stable.yml
+++ b/.github/workflows/release-desktop-stable.yml
@@ -380,6 +380,12 @@ jobs:
permissions:
contents: write
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
- name: Download merged artifacts
uses: actions/download-artifact@v7
with:
@@ -408,7 +414,7 @@ jobs:
release/*.rpm*
release/*.tar.gz*
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# ============================================
# 发布到 S3 更新服务器
@@ -420,7 +426,15 @@ jobs:
# 手动触发时可选择跳过
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.skip_s3_upload) }}
steps:
+ - uses: actions/create-github-app-token@v2
+ id: app-token
+ with:
+ app-id: ${{ vars.LOBEHUB_BOT_APP_ID }}
+ private-key: ${{ secrets.LOBEHUB_BOT_APP_PRIVATE_KEY }}
+
- uses: actions/checkout@v7
+ with:
+ token: ${{ steps.app-token.outputs.token }}
- uses: ./.github/actions/desktop-publish-s3
with:
channel: stable