From eecbddc4aa7ee0ca2b14331000908ada64819515 Mon Sep 17 00:00:00 2001 From: Stefan Ruzitschka <362487+icepuma@users.noreply.github.com> Date: Wed, 21 Jan 2026 21:54:21 +0100 Subject: [PATCH] chore(infra): rename ci workflow and tag releases Why: - ensure tag pushes create GitHub releases - standardize workflow filename Impact: - uploads raw binaries to releases on tags - removes website deploy workflow - Tests: just check --- .github/workflows/{ci-e2e.yml => ci.yml} | 50 +++++++++++++++---- .github/workflows/deploy-website.yml | 61 ------------------------ 2 files changed, 41 insertions(+), 70 deletions(-) rename .github/workflows/{ci-e2e.yml => ci.yml} (86%) delete mode 100644 .github/workflows/deploy-website.yml diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci.yml similarity index 86% rename from .github/workflows/ci-e2e.yml rename to .github/workflows/ci.yml index ad65e27..7c981e9 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,8 @@ on: push: branches: - main + tags: + - "*" workflow_dispatch: jobs: @@ -41,7 +43,7 @@ jobs: cp target/aarch64-unknown-linux-musl/release/intar-agent prebuilt-agents/intar-agent-aarch64 - name: Upload prebuilt agents - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: intar-agent-musl path: prebuilt-agents @@ -82,7 +84,7 @@ jobs: uses: actions/checkout@v6 - name: Download prebuilt agents - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: intar-agent-musl path: prebuilt-agents @@ -121,7 +123,7 @@ jobs: build: name: Build - ${{ matrix.platform.os-name }} - if: github.ref == 'refs/heads/main' + if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') needs: prebuild-agents env: INTAR_AGENT_X86_64_PATH: ${{ github.workspace }}/prebuilt-agents/intar-agent-x86_64 @@ -161,7 +163,7 @@ jobs: uses: actions/checkout@v6 - name: Download prebuilt agents - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: intar-agent-musl path: prebuilt-agents @@ -207,11 +209,41 @@ jobs: args: "--locked --release --package intar-cli --bin intar" strip: true - - name: Upload binary - uses: actions/upload-artifact@v4 + - name: Upload binary (Unix) + if: runner.os != 'Windows' + uses: actions/upload-artifact@v6 + with: + name: intar-${{ matrix.platform.target }} + path: target/${{ matrix.platform.target }}/release/intar + + - name: Upload binary (Windows) + if: runner.os == 'Windows' + uses: actions/upload-artifact@v6 + with: + name: intar-${{ matrix.platform.target }} + path: target/${{ matrix.platform.target }}/release/intar.exe + + release: + name: Release + if: startsWith(github.ref, 'refs/tags/') + needs: build + runs-on: ubuntu-24.04 + permissions: + contents: write + steps: + - name: Download build artifacts + uses: actions/download-artifact@v7 + with: + pattern: intar-* + path: dist + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 with: - name: intar-${{ matrix.platform.os-name }} - path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} + files: | + dist/*/intar + dist/*/intar.exe + generate_release_notes: true e2e: name: E2E - ${{ matrix.os-name }} @@ -235,7 +267,7 @@ jobs: uses: actions/checkout@v6 - name: Download prebuilt agents - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v7 with: name: intar-agent-musl path: prebuilt-agents diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml deleted file mode 100644 index 3f17b03..0000000 --- a/.github/workflows/deploy-website.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Deploy Website - -on: - push: - branches: - - main - paths: - - "website/**" - - ".github/workflows/deploy-website.yml" - workflow_dispatch: - -concurrency: - group: website-production - cancel-in-progress: true - -jobs: - deploy: - name: Deploy Cloudflare Worker - runs-on: ubuntu-latest - environment: - name: production - url: ${{ steps.deploy.outputs.deployment-url }} - permissions: - contents: read - deployments: write - defaults: - run: - working-directory: website - steps: - - name: Check out repository - uses: actions/checkout@v5 - - - name: Set up Bun - uses: oven-sh/setup-bun@v2.0.2 - with: - bun-version: "latest" - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Build website - run: bun run build - - - name: Apply database migrations - id: migrations - uses: cloudflare/wrangler-action@v3.14.1 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - workingDirectory: website - command: d1 migrations apply intar-dev --remote - - - name: Deploy worker - id: deploy - uses: cloudflare/wrangler-action@v3.14.1 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - workingDirectory: website - command: deploy - packageManager: bun