mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-04 03:37:17 +00:00
sync
This commit is contained in:
21
.github/workflows/publish.yml
vendored
21
.github/workflows/publish.yml
vendored
@@ -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 }}
|
||||||
|
|||||||
@@ -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}`)
|
||||||
|
|||||||
Reference in New Issue
Block a user