Skip to content

Commit db88bed

Browse files
committed
sync
1 parent d4d218d commit db88bed

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
with:
3333
bun-version: 1.2.16
3434

35+
- name: Setup SSH for AUR
36+
run: |
37+
mkdir -p ~/.ssh
38+
echo "${{ secrets.AUR_KEY }}" > ~/.ssh/id_rsa
39+
chmod 600 ~/.ssh/id_rsa
40+
3541
- run: |
3642
bun install
3743
./script/publish.ts

packages/opencode/script/publish.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,18 +144,11 @@ if (!snapshot) {
144144
)
145145

146146
await $`rm -rf ./dist/aur-opencode-bin`
147-
const gitEnv: Record<string, string> = process.env["AUR_KEY"]
148-
? { GIT_SSH_COMMAND: `ssh -i "${process.env["AUR_KEY"].trim()}"` }
149-
: {}
150147

151-
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`.env(
152-
gitEnv,
153-
)
148+
await $`git clone ssh://aur@aur.archlinux.org/opencode-bin.git ./dist/aur-opencode-bin`
154149
await Bun.file("./dist/aur-opencode-bin/PKGBUILD").write(pkgbuild)
155150
await $`cd ./dist/aur-opencode-bin && makepkg --printsrcinfo > .SRCINFO`
156-
await $`cd ./dist/aur-opencode-bin && git add PKGBUILD .SRCINFO`.env(gitEnv)
157-
await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`.env(
158-
gitEnv,
159-
)
160-
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`.env(gitEnv)
151+
await $`cd ./dist/aur-opencode-bin && git add PKGBUILD .SRCINFO`
152+
await $`cd ./dist/aur-opencode-bin && git commit -m "Update to v${version}"`
153+
if (!dry) await $`cd ./dist/aur-opencode-bin && git push`
161154
}

0 commit comments

Comments
 (0)