mirror of
https://github.com/sst/opencode.git
synced 2025-08-31 18:27:22 +00:00
sync
This commit is contained in:
parent
d4d218d7d6
commit
db88bede05
2 changed files with 10 additions and 11 deletions
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
|
@ -32,6 +32,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
bun-version: 1.2.16
|
bun-version: 1.2.16
|
||||||
|
|
||||||
|
- name: Setup SSH for AUR
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
bun install
|
bun install
|
||||||
./script/publish.ts
|
./script/publish.ts
|
||||||
|
|
|
@ -144,18 +144,11 @@ if (!snapshot) {
|
||||||
)
|
)
|
||||||
|
|
||||||
await $`rm -rf ./dist/aur-opencode-bin`
|
await $`rm -rf ./dist/aur-opencode-bin`
|
||||||
const gitEnv: Record<string, string> = process.env["AUR_KEY"]
|
|
||||||
? { GIT_SSH_COMMAND: `ssh -i "${process.env["AUR_KEY"].trim()}"` }
|
|
||||||
: {}
|
|
||||||
|
|
||||||
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`.env(
|
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`
|
||||||
gitEnv,
|
|
||||||
)
|
|
||||||
await Bun.file("./dist/aur-opencode-bin/PKGBUILD").write(pkgbuild)
|
await Bun.file("./dist/aur-opencode-bin/PKGBUILD").write(pkgbuild)
|
||||||
await $`cd ./dist/aur-opencode-bin && makepkg --printsrcinfo > .SRCINFO`
|
await $`cd ./dist/aur-opencode-bin && makepkg --printsrcinfo > .SRCINFO`
|
||||||
await $`cd ./dist/aur-opencode-bin && git add PKGBUILD .SRCINFO`.env(gitEnv)
|
await $`cd ./dist/aur-opencode-bin && git add PKGBUILD .SRCINFO`
|
||||||
await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`.env(
|
await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`
|
||||||
gitEnv,
|
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`
|
||||||
)
|
|
||||||
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`.env(gitEnv)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue