|
|
@@ -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
|