This commit is contained in:
Dax Raad 2025-06-12 14:06:06 -04:00
parent d4d218d7d6
commit db88bede05
2 changed files with 10 additions and 11 deletions

View file

@ -32,6 +32,12 @@ jobs:
with:
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: |
bun install
./script/publish.ts

View file

@ -144,18 +144,11 @@ if (!snapshot) {
)
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(
gitEnv,
)
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`
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 && git add PKGBUILD .SRCINFO`.env(gitEnv)
await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`.env(
gitEnv,
)
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`.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}"`
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`
}