4141
4242 - uses : ./.github/actions/setup-bun
4343
44+ - name : Setup git committer
45+ id : committer
46+ uses : ./.github/actions/setup-git-committer
47+ with :
48+ opencode-app-id : ${{ vars.OPENCODE_APP_ID }}
49+ opencode-app-secret : ${{ secrets.OPENCODE_APP_SECRET }}
50+
4451 - name : Install OpenCode
4552 if : inputs.bump || inputs.version
4653 run : bun i -g opencode-ai
@@ -49,14 +56,16 @@ jobs:
4956 run : |
5057 ./script/version.ts
5158 env :
52- GH_TOKEN : ${{ github .token }}
59+ GH_TOKEN : ${{ steps.committer.outputs .token }}
5360 OPENCODE_BUMP : ${{ inputs.bump }}
5461 OPENCODE_VERSION : ${{ inputs.version }}
5562 OPENCODE_API_KEY : ${{ secrets.OPENCODE_API_KEY }}
63+ GH_REPO : ${{ (github.ref_name == 'beta' && 'anomalyco/opencode-beta') || github.repository }}
5664 outputs :
5765 version : ${{ steps.version.outputs.version }}
5866 release : ${{ steps.version.outputs.release }}
5967 tag : ${{ steps.version.outputs.tag }}
68+ repo : ${{ steps.version.outputs.repo }}
6069
6170 build-cli :
6271 needs : version
@@ -69,14 +78,22 @@ jobs:
6978
7079 - uses : ./.github/actions/setup-bun
7180
81+ - name : Setup git committer
82+ id : committer
83+ uses : ./.github/actions/setup-git-committer
84+ with :
85+ opencode-app-id : ${{ vars.OPENCODE_APP_ID }}
86+ opencode-app-secret : ${{ secrets.OPENCODE_APP_SECRET }}
87+
7288 - name : Build
7389 id : build
7490 run : |
7591 ./packages/opencode/script/build.ts
7692 env :
7793 OPENCODE_VERSION : ${{ needs.version.outputs.version }}
7894 OPENCODE_RELEASE : ${{ needs.version.outputs.release }}
79- GH_TOKEN : ${{ github.token }}
95+ GH_REPO : ${{ needs.version.outputs.repo }}
96+ GH_TOKEN : ${{ steps.committer.outputs.token }}
8097
8198 - uses : actions/upload-artifact@v4
8299 with :
@@ -189,21 +206,30 @@ jobs:
189206 if : contains(matrix.settings.host, 'ubuntu')
190207 run : cargo tauri --version
191208
209+ - name : Setup git committer
210+ id : committer
211+ uses : ./.github/actions/setup-git-committer
212+ with :
213+ opencode-app-id : ${{ vars.OPENCODE_APP_ID }}
214+ opencode-app-secret : ${{ secrets.OPENCODE_APP_SECRET }}
215+
192216 - name : Build and upload artifacts
193217 uses : tauri-apps/tauri-action@390cbe447412ced1303d35abe75287949e43437a
194218 timeout-minutes : 60
195219 with :
196220 projectPath : packages/desktop
197221 uploadWorkflowArtifacts : true
198222 tauriScript : ${{ (contains(matrix.settings.host, 'ubuntu') && 'cargo tauri') || '' }}
199- args : --target ${{ matrix.settings.target }} --config . /src-tauri/tauri.prod.conf.json --verbose
223+ args : --target ${{ matrix.settings.target }} --config ${{ (github.ref_name == 'beta' && '. /src-tauri/tauri.beta.conf.json') || './src-tauri/tauri. prod.conf.json' }} --verbose
200224 updaterJsonPreferNsis : true
201225 releaseId : ${{ needs.version.outputs.release }}
202226 tagName : ${{ needs.version.outputs.tag }}
203227 releaseDraft : true
204228 releaseAssetNamePattern : opencode-desktop-[platform]-[arch][ext]
229+ repo : ${{ (github.ref_name == 'beta' && 'opencode-beta') || '' }}
230+ releaseCommitish : ${{ github.sha }}
205231 env :
206- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
232+ GITHUB_TOKEN : ${{ steps.committer.outputs.token }}
207233 TAURI_BUNDLER_NEW_APPIMAGE_FORMAT : true
208234 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
209235 TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
@@ -280,4 +306,5 @@ jobs:
280306 OPENCODE_RELEASE : ${{ needs.version.outputs.release }}
281307 AUR_KEY : ${{ secrets.AUR_KEY }}
282308 GITHUB_TOKEN : ${{ steps.committer.outputs.token }}
309+ GH_REPO : ${{ needs.version.outputs.repo }}
283310 NPM_CONFIG_PROVENANCE : false
0 commit comments