This commit is contained in:
Dax Raad
2026-01-30 09:19:37 -05:00
parent 00637c0269
commit 8fd5fe6a5f
2 changed files with 13 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ on:
- ci - ci
- dev - dev
- beta - beta
- workflow/publish-updates
- snapshot-* - snapshot-*
workflow_dispatch: workflow_dispatch:
inputs: inputs:
@@ -49,7 +50,7 @@ jobs:
run: | run: |
./script/version.ts ./script/version.ts
env: env:
GH_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
OPENCODE_BUMP: ${{ inputs.bump }} OPENCODE_BUMP: ${{ inputs.bump }}
OPENCODE_VERSION: ${{ inputs.version }} OPENCODE_VERSION: ${{ inputs.version }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
@@ -76,7 +77,7 @@ jobs:
env: env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
OPENCODE_RELEASE: ${{ needs.version.outputs.release }} OPENCODE_RELEASE: ${{ needs.version.outputs.release }}
GH_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
@@ -166,7 +167,7 @@ jobs:
OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}
GITHUB_TOKEN: ${{ steps.committer.outputs.token }} GITHUB_TOKEN: ${{ steps.committer.outputs.token }}
RUST_TARGET: ${{ matrix.settings.target }} RUST_TARGET: ${{ matrix.settings.target }}
GH_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_RUN_ID: ${{ github.run_id }}
# Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released # Fixes AppImage build issues, can be removed when https://github.com/tauri-apps/tauri/pull/12491 is released
@@ -231,13 +232,6 @@ jobs:
node-version: "24" node-version: "24"
registry-url: "https://registry.npmjs.org" registry-url: "https://registry.npmjs.org"
- 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 }}
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
name: opencode-cli name: opencode-cli
@@ -262,6 +256,13 @@ jobs:
git config --global user.name "opencode" git config --global user.name "opencode"
ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true
- 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 }}
- run: ./script/publish.ts - run: ./script/publish.ts
env: env:
OPENCODE_VERSION: ${{ needs.version.outputs.version }} OPENCODE_VERSION: ${{ needs.version.outputs.version }}

View File

@@ -6,14 +6,14 @@ import { buildNotes, getLatestRelease } from "./changelog"
const output = [`version=${Script.version}`] const output = [`version=${Script.version}`]
if (!Script.preview) { if (!Script.preview || true) {
const previous = await getLatestRelease() const previous = await getLatestRelease()
const notes = await buildNotes(previous, "HEAD") const notes = await buildNotes(previous, "HEAD")
const body = notes.join("\n") || "No notable changes" const body = notes.join("\n") || "No notable changes"
const dir = process.env.RUNNER_TEMP ?? "/tmp" const dir = process.env.RUNNER_TEMP ?? "/tmp"
const file = `${dir}/opencode-release-notes.txt` const file = `${dir}/opencode-release-notes.txt`
await Bun.write(file, body) await Bun.write(file, body)
await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes-file ${file}` await $`gh release create v${Script.version} -d --title "v${Script.version}" --notes-file ${file} --prerelease=${Script.preview}`
const release = await $`gh release view v${Script.version} --json id,tagName`.json() const release = await $`gh release view v${Script.version} --json id,tagName`.json()
output.push(`release=${release.id}`) output.push(`release=${release.id}`)
output.push(`tag=${release.tagName}`) output.push(`tag=${release.tagName}`)