From 3e428172efc78661e0d4844177b216ebc101d7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20M=C3=A2rza?= Date: Sun, 22 Mar 2026 23:27:45 +0200 Subject: [PATCH] feat: add GitHub release workflow for binary distribution --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..5084c1881 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + name: Build and Release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Bun + uses: ./.github/actions/setup-bun + + - name: Create release + run: gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --title ${{ github.ref_name }} --generate-notes + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and upload binaries + run: | + cd packages/opencode + OPENCODE_RELEASE=1 OPENCODE_VERSION=${GITHUB_REF#refs/tags/v} GH_REPO=${{ github.repository }} bun run build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}