diff options
| author | Brendan Allan <[email protected]> | 2026-02-20 22:33:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-20 22:33:21 +0800 |
| commit | ce17f9dd9451feae8b80f7d8054be5b72ce8d1fa (patch) | |
| tree | 5a5c6df3add43e6900c9caadce08c111eef1f8e4 /.github/workflows | |
| parent | 92ab4217c241f1fe75ac3d99bc455d0005383d3b (diff) | |
| download | opencode-ce17f9dd9451feae8b80f7d8054be5b72ce8d1fa.tar.gz opencode-ce17f9dd9451feae8b80f7d8054be5b72ce8d1fa.zip | |
desktop: publish betas to separate repo (#14376)
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/publish.yml | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 431581f59..8d4c9038a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,6 +41,13 @@ jobs: - uses: ./.github/actions/setup-bun + - name: Setup git committer + id: committer + uses: ./.github/actions/setup-git-committer + with: + opencode-app-id: ${{ vars.OPENCODE_APP_ID }} + opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} + - name: Install OpenCode if: inputs.bump || inputs.version run: bun i -g opencode-ai @@ -49,14 +56,16 @@ jobs: run: | ./script/version.ts env: - GH_TOKEN: ${{ github.token }} + GH_TOKEN: ${{ steps.committer.outputs.token }} OPENCODE_BUMP: ${{ inputs.bump }} OPENCODE_VERSION: ${{ inputs.version }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} + GH_REPO: ${{ (github.ref_name == 'beta' && 'anomalyco/opencode-beta') || github.repository }} outputs: version: ${{ steps.version.outputs.version }} release: ${{ steps.version.outputs.release }} tag: ${{ steps.version.outputs.tag }} + repo: ${{ steps.version.outputs.repo }} build-cli: needs: version @@ -69,6 +78,13 @@ jobs: - uses: ./.github/actions/setup-bun + - name: Setup git committer + id: committer + uses: ./.github/actions/setup-git-committer + with: + opencode-app-id: ${{ vars.OPENCODE_APP_ID }} + opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} + - name: Build id: build run: | @@ -76,7 +92,8 @@ jobs: env: OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }} - GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ needs.version.outputs.repo }} + GH_TOKEN: ${{ steps.committer.outputs.token }} - uses: actions/upload-artifact@v4 with: @@ -189,6 +206,13 @@ jobs: if: contains(matrix.settings.host, 'ubuntu') run: cargo tauri --version + - name: Setup git committer + id: committer + uses: ./.github/actions/setup-git-committer + with: + opencode-app-id: ${{ vars.OPENCODE_APP_ID }} + opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} + - name: Build and upload artifacts uses: tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a timeout-minutes: 60 @@ -196,14 +220,16 @@ jobs: projectPath: packages/desktop uploadWorkflowArtifacts: true tauriScript: ${{ (contains(matrix.settings.host, 'ubuntu') && 'cargo tauri') || '' }} - args: --target ${{ matrix.settings.target }} --config ./src-tauri/tauri.prod.conf.json --verbose + args: --target ${{ matrix.settings.target }} --config ${{ (github.ref_name == 'beta' && './src-tauri/tauri.beta.conf.json') || './src-tauri/tauri.prod.conf.json' }} --verbose updaterJsonPreferNsis: true releaseId: ${{ needs.version.outputs.release }} tagName: ${{ needs.version.outputs.tag }} releaseDraft: true releaseAssetNamePattern: opencode-desktop-[platform]-[arch][ext] + repo: ${{ (github.ref_name == 'beta' && 'opencode-beta') || '' }} + releaseCommitish: ${{ github.sha }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.committer.outputs.token }} TAURI_BUNDLER_NEW_APPIMAGE_FORMAT: true TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} @@ -280,4 +306,5 @@ jobs: OPENCODE_RELEASE: ${{ needs.version.outputs.release }} AUR_KEY: ${{ secrets.AUR_KEY }} GITHUB_TOKEN: ${{ steps.committer.outputs.token }} + GH_REPO: ${{ needs.version.outputs.repo }} NPM_CONFIG_PROVENANCE: false |
