Something went wrong. Try again.
A lexicon-driven AppView for ATProto.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036name: CI
on: push: branches: [main, dev] pull_request: branches: [main, dev] workflow_dispatch: inputs: server: description: "Build server (unit tests, e2e, frontend, lint, release)" type: boolean default: true oauth-client: description: "Build oauth-client" type: boolean default: false oauth-client-browser: description: "Build oauth-client-browser" type: boolean default: false oauth-client-node: description: "Build oauth-client-node" type: boolean default: false lex-agent: description: "Build lex-agent" type: boolean default: false delete:
env: SQLX_OFFLINE: true
permissions: id-token: write # Required for OIDC
jobs: # --------------------------------------------------------------------------- # Path detection — determines which job groups should run. # Required because workflow-level `paths` filters can't vary per job. # --------------------------------------------------------------------------- changes: if: github.event_name == 'pull_request' || github.event_name == 'push' runs-on: depot-ubuntu-24.04 outputs: server: ${{ steps.filter.outputs.server }} oauth-client: ${{ steps.filter.outputs.oauth-client }} oauth-client-browser: ${{ steps.filter.outputs.oauth-client-browser }} oauth-client-node: ${{ steps.filter.outputs.oauth-client-node }} lex-agent: ${{ steps.filter.outputs.lex-agent }} steps: - name: Checkout repository uses: actions/checkout@v6
- name: Detect changed paths id: filter uses: dorny/paths-filter@v4 with: filters: | server: - 'src/**' - 'web/**' - 'migrations/**' - 'tests/**' - 'Cargo.*' - 'Dockerfile' - 'docker-compose*' - 'entrypoint.sh' - '.releaserc.json' oauth-client: - 'packages/oauth-client/**' oauth-client-browser: - 'packages/oauth-client/**' - 'packages/oauth-client-browser/**' oauth-client-node: - 'packages/oauth-client/**' - 'packages/oauth-client-node/**' lex-agent: - 'packages/oauth-client/**' - 'packages/lex-agent/**'
# --------------------------------------------------------------------------- # Server — unit tests, e2e tests, frontend build, lint # --------------------------------------------------------------------------- # --------------------------------------------------------------------------- # Build server binary — shared by playwright and pr-build (amd64) # --------------------------------------------------------------------------- build-server: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 timeout-minutes: 15 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Cache cargo uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-release-amd64-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-release-amd64-
- name: Build release binary run: | docker run --rm \ -v "$PWD:/app" \ -v "$HOME/.cargo/registry:/usr/local/cargo/registry" \ -v "$HOME/.cargo/git:/usr/local/cargo/git" \ -w /app \ -e SQLX_OFFLINE=true \ rust:1.96.1-bookworm \ cargo build --release
- name: Upload server binary uses: actions/upload-artifact@v4 with: name: happyview-server path: target/release/happyview
unit-tests: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 timeout-minutes: 15 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Cache cargo uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-${{ runner.os }}-
- name: Run unit tests run: cargo test --lib
e2e-tests: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 timeout-minutes: 15 services: postgres: image: postgres:16-alpine env: POSTGRES_USER: happyview POSTGRES_PASSWORD: happyview POSTGRES_DB: happyview_test ports: - 5432:5432 options: >- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Cache cargo uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-${{ runner.os }}-
# Reclaim ~20 GB of preinstalled tooling the Rust build never uses. The # e2e build (all test binaries in debug) plus the restored target cache # otherwise exhausts the runner disk ("No space left on device"). - name: Free disk space run: | sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc \ /usr/local/.ghcup /opt/hostedtoolcache/CodeQL df -h /
- name: Add WASM target run: rustup target add wasm32-unknown-unknown
- name: Build test plugin run: cargo build --manifest-path tests/fixtures/test_plugin/Cargo.toml --target wasm32-unknown-unknown --release
# Fast-failing, named gate: verify migrations apply on an *old* (v2.0.0) # database — schema + data, both SQLite and Postgres — not just a fresh one. # (Also included in the full run below; runs here first for a clear signal, # sharing the compiled test binary so the extra cost is ~a second.) - name: Migration upgrade test (old DB → latest) env: TEST_DATABASE_URL: postgres://happyview:happyview@localhost:5432/happyview_test CARGO_PROFILE_DEV_DEBUG: "0" run: cargo test --test migration_upgrade
- name: Run e2e tests env: TEST_DATABASE_URL: postgres://happyview:happyview@localhost:5432/happyview_test # Drop debuginfo from the test build — it dominates target/ size and is # unnecessary in CI. Keeps the enlarged dependency build within disk. CARGO_PROFILE_DEV_DEBUG: "0" run: cargo test --tests
frontend: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Build frontend working-directory: web run: npm ci && npm run build
lint: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Cache cargo uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-lint-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-lint-${{ runner.os }}-
- name: Check formatting run: cargo fmt -- --check
- name: Clippy run: cargo clippy --all-targets -- -D warnings
audit: needs: changes if: always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Install cargo-audit uses: taiki-e/install-action@v2 with: tool: cargo-audit
# Fails on any advisory not triaged in .cargo/audit.toml, so newly # disclosed vulnerabilities in our dependencies are caught. - name: Audit dependencies run: cargo audit
playwright: needs: [changes, frontend, build-server] if: >- always() && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) && needs.frontend.result == 'success' && needs.build-server.result == 'success' runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Install frontend dependencies working-directory: web run: npm ci
- name: Install Playwright browsers working-directory: web run: npx playwright install chromium --with-deps
- name: Download server binary uses: actions/download-artifact@v4 with: name: happyview-server path: .builder-override/app/target/release
- name: Log in to ATCR run: echo "${{ secrets.ATCR_PASSWORD }}" | docker login atcr.io -u "${{ secrets.ATCR_USERNAME }}" --password-stdin
- name: Start E2E services run: docker compose -f docker-compose.e2e.yml -f docker-compose.e2e.ci.yml up -d --build --wait timeout-minutes: 10
- name: Run Playwright tests working-directory: web run: npx playwright test env: PLAYWRIGHT_BASE_URL: http://127.0.0.1:3200
- name: Dump container logs if: failure() run: docker compose -f docker-compose.e2e.yml -f docker-compose.e2e.ci.yml logs
- name: Upload Playwright report if: failure() uses: actions/upload-artifact@v4 with: name: playwright-report path: web/playwright-report/ retention-days: 14
- name: Stop E2E services if: always() run: docker compose -f docker-compose.e2e.yml -f docker-compose.e2e.ci.yml down -v
# --------------------------------------------------------------------------- # PR builds — compile + Docker on every PR push so reviewers can test # --------------------------------------------------------------------------- pr-build: needs: [changes, build-server] if: >- github.event_name == 'pull_request' && github.head_ref != 'dev' && needs.changes.outputs.server == 'true' runs-on: ${{ matrix.runs-on }} permissions: contents: read packages: write strategy: fail-fast: false matrix: include: - platform: linux/amd64 runs-on: depot-ubuntu-24.04 arch: amd64 - platform: linux/arm64 runs-on: depot-ubuntu-24.04-arm arch: arm64 env: GHCR_IMAGE: ghcr.io/${{ github.repository }} steps: - name: Checkout repository uses: actions/checkout@v6
- name: Download server binary (amd64) if: matrix.arch == 'amd64' uses: actions/download-artifact@v4 with: name: happyview-server path: target/release
- name: Cache cargo (arm64) if: matrix.arch != 'amd64' uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-release-${{ matrix.arch }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-release-${{ matrix.arch }}-
- name: Build release binary (arm64) if: matrix.arch != 'amd64' run: | docker run --rm \ -v "$PWD:/app" \ -v "$HOME/.cargo/registry:/usr/local/cargo/registry" \ -v "$HOME/.cargo/git:/usr/local/cargo/git" \ -w /app \ -e SQLX_OFFLINE=true \ rust:1.96.1-bookworm \ cargo build --release
- name: Upload artifact uses: actions/upload-artifact@v4 with: name: happyview-linux-${{ matrix.arch }} path: target/release/happyview
- name: Prepare binary override run: | mkdir -p .builder-override/app/target/release cp target/release/happyview .builder-override/app/target/release/happyview
- name: Set up Docker Buildx uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.GHCR_IMAGE }} tags: | type=raw,value=pr-${{ github.event.pull_request.number }}
- name: Build and push by digest id: build uses: docker/build-push-action@v5 with: context: . platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} build-contexts: | builder=.builder-override cache-from: type=gha,scope=pr-${{ matrix.platform }} cache-to: type=gha,scope=pr-${{ matrix.platform }},mode=max,ignore-error=true outputs: type=image,"name=${{ env.GHCR_IMAGE }}",push-by-digest=true,name-canonical=true,push=true
- name: Create manifest run: | TAGS=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< '${{ steps.meta.outputs.json }}') docker buildx imagetools create --append $TAGS \ ${{ env.GHCR_IMAGE }}@${{ steps.build.outputs.digest }} 2>/dev/null || \ docker buildx imagetools create $TAGS \ ${{ env.GHCR_IMAGE }}@${{ steps.build.outputs.digest }}
pr-build-comment: needs: pr-build runs-on: depot-ubuntu-24.04 permissions: pull-requests: write steps: - name: Comment on PR uses: actions/github-script@v7 with: script: | const sha = context.payload.pull_request.head.sha.substring(0, 7); const prNumber = context.payload.pull_request.number; const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`; const image = `ghcr.io/${context.repo.owner}/${context.repo.repo}`; const body = [ '### PR Build', '', `Builds for \`${sha}\`:`, '', '**Docker**', '```sh', `docker pull ${image}:pr-${prNumber}`, '```', '', '**Binaries**', '```sh', `gh run download ${context.runId} -n happyview-linux-amd64`, `gh run download ${context.runId} -n happyview-linux-arm64`, '```', '', `Or download binaries from the [workflow run](${runUrl}).`, ].join('\n');
const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, }); const existing = comments.find(c => c.body.startsWith('### PR Build'));
if (existing) { await github.rest.issues.updateComment({ owner: context.repo.owner, repo: context.repo.repo, comment_id: existing.id, body, }); } else { await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, body, }); }
# --------------------------------------------------------------------------- # Server release # --------------------------------------------------------------------------- release: if: >- always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (needs.changes.outputs.server == 'true' || (github.event_name == 'workflow_dispatch' && inputs.server)) && needs.unit-tests.result == 'success' && needs.e2e-tests.result == 'success' && needs.frontend.result == 'success' && needs.playwright.result == 'success' && needs.lint.result == 'success' needs: [changes, unit-tests, e2e-tests, frontend, playwright, lint] runs-on: depot-ubuntu-24.04 outputs: version: ${{ steps.semantic.outputs.version }} permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 22
- name: Release id: semantic env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} run: npx -p semantic-release -p semantic-release-gha-output semantic-release
# --------------------------------------------------------------------------- # Build + Docker — compile per-platform, upload to GitHub release, push image # --------------------------------------------------------------------------- build: needs: release if: needs.release.outputs.version != '' runs-on: ${{ matrix.runs-on }} permissions: contents: write packages: write id-token: write strategy: fail-fast: false matrix: include: - platform: linux/amd64 runs-on: depot-ubuntu-24.04 arch: amd64 - platform: linux/arm64 runs-on: depot-ubuntu-24.04-arm arch: arm64 env: GHCR_IMAGE: ghcr.io/${{ github.repository }} ATCR_IMAGE: atcr.io/${{ secrets.ATCR_NAMESPACE }}/happyview steps: - name: Checkout repository uses: actions/checkout@v6
- name: Cache cargo uses: actions/cache@v5 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-release-${{ matrix.arch }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-release-${{ matrix.arch }}-
- name: Build release binary run: | docker run --rm \ -v "$PWD:/app" \ -v "$HOME/.cargo/registry:/usr/local/cargo/registry" \ -v "$HOME/.cargo/git:/usr/local/cargo/git" \ -w /app \ -e SQLX_OFFLINE=true \ -e HAPPYVIEW_VERSION="v${{ needs.release.outputs.version }}" \ rust:1.96.1-bookworm \ cargo build --release
- name: Upload binary to release env: GH_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} run: | cp target/release/happyview happyview-linux-${{ matrix.arch }} gh release upload "v${{ needs.release.outputs.version }}" \ happyview-linux-${{ matrix.arch }} \ --clobber
- name: Prepare binary override run: | mkdir -p .builder-override/app/target/release cp target/release/happyview .builder-override/app/target/release/happyview
- name: Set up Docker Buildx uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }}
# TODO: Re-enable once ATCR rate limit issue is resolved # - name: Log in to ATCR # uses: docker/login-action@v3 # with: # registry: atcr.io # username: ${{ secrets.ATCR_USERNAME }} # password: ${{ secrets.ATCR_PASSWORD }}
- name: Parse version id: version run: | VERSION="${{ needs.release.outputs.version }}" MAJOR="${VERSION%%.*}" MINOR="${VERSION#*.}" MINOR="${MINOR%%.*}" echo "full=${VERSION}" >> "$GITHUB_OUTPUT" echo "major=${MAJOR}" >> "$GITHUB_OUTPUT" echo "major_minor=${MAJOR}.${MINOR}" >> "$GITHUB_OUTPUT"
- name: Extract GHCR metadata id: meta-ghcr uses: docker/metadata-action@v5 with: images: ${{ env.GHCR_IMAGE }} tags: | type=raw,value=${{ steps.version.outputs.full }} type=raw,value=${{ steps.version.outputs.major_minor }} type=raw,value=${{ steps.version.outputs.major }} type=sha
# TODO: Re-enable once ATCR rate limit issue is resolved # - name: Extract ATCR metadata # id: meta-atcr # uses: docker/metadata-action@v5 # with: # images: ${{ env.ATCR_IMAGE }} # tags: | # type=semver,pattern={{version}} # type=semver,pattern={{major}}.{{minor}} # type=semver,pattern={{major}} # type=sha
- name: Build and push to GHCR by digest id: build uses: docker/build-push-action@v5 with: context: . platforms: ${{ matrix.platform }} labels: ${{ steps.meta-ghcr.outputs.labels }} build-contexts: | builder=.builder-override cache-from: type=gha,scope=build-${{ matrix.platform }} cache-to: type=gha,scope=build-${{ matrix.platform }},mode=max,ignore-error=true outputs: type=image,"name=${{ env.GHCR_IMAGE }}",push-by-digest=true,name-canonical=true,push=true
# TODO: Re-enable once ATCR rate limit issue is resolved # - name: Push to ATCR by digest # id: build-atcr # continue-on-error: true # uses: docker/build-push-action@v5 # with: # context: . # platforms: ${{ matrix.platform }} # labels: ${{ steps.meta-atcr.outputs.labels }} # build-contexts: | # builder=.builder-override # cache-from: type=gha,scope=build-${{ matrix.platform }} # outputs: type=image,"name=${{ env.ATCR_IMAGE }}",push-by-digest=true,name-canonical=true,push=true
- name: Create GHCR manifest run: | GHCR_TAGS=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< '${{ steps.meta-ghcr.outputs.json }}') docker buildx imagetools create --append $GHCR_TAGS \ ${{ env.GHCR_IMAGE }}@${{ steps.build.outputs.digest }} 2>/dev/null || \ docker buildx imagetools create $GHCR_TAGS \ ${{ env.GHCR_IMAGE }}@${{ steps.build.outputs.digest }}
# TODO: Re-enable once ATCR rate limit issue is resolved # - name: Create ATCR manifest # if: steps.build-atcr.outcome == 'success' # continue-on-error: true # run: | # ATCR_TAGS=$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< '${{ steps.meta-atcr.outputs.json }}') # if [ -n "$ATCR_TAGS" ]; then # docker buildx imagetools create --append $ATCR_TAGS \ # ${{ env.ATCR_IMAGE }}@${{ steps.build-atcr.outputs.digest }} 2>/dev/null || \ # docker buildx imagetools create $ATCR_TAGS \ # ${{ env.ATCR_IMAGE }}@${{ steps.build-atcr.outputs.digest }} # fi
# --------------------------------------------------------------------------- # SDK — per-package tests + releases # --------------------------------------------------------------------------- test-oauth-client: needs: changes if: always() && (needs.changes.outputs.oauth-client == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Install dependencies run: bun install
- name: Build run: bun run --filter '@happyview/oauth-client' build
- name: Typecheck run: bun run --filter '@happyview/oauth-client' typecheck
- name: Test run: bun run --filter '@happyview/oauth-client' test
test-oauth-client-browser: needs: changes if: always() && (needs.changes.outputs.oauth-client-browser == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client-browser)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Install dependencies run: bun install
- name: Build oauth-client run: bun run --filter '@happyview/oauth-client' build
- name: Build oauth-client-browser run: bun run --filter '@happyview/oauth-client-browser' build
- name: Typecheck run: bun run --filter '@happyview/oauth-client-browser' typecheck
- name: Test run: bun run --filter '@happyview/oauth-client-browser' test
test-oauth-client-node: needs: changes if: always() && (needs.changes.outputs.oauth-client-node == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client-node)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Install dependencies run: bun install
- name: Build oauth-client run: bun run --filter '@happyview/oauth-client' build
- name: Build oauth-client-node run: bun run --filter '@happyview/oauth-client-node' build
- name: Typecheck run: bun run --filter '@happyview/oauth-client-node' typecheck
- name: Test run: bun run --filter '@happyview/oauth-client-node' test
test-lex-agent: needs: changes if: always() && (needs.changes.outputs.lex-agent == 'true' || (github.event_name == 'workflow_dispatch' && inputs.lex-agent)) runs-on: depot-ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@v6
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Install dependencies run: bun install
- name: Build oauth-client run: bun run --filter '@happyview/oauth-client' build
- name: Build lex-agent run: bun run --filter '@happyview/lex-agent' build
- name: Typecheck run: bun run --filter '@happyview/lex-agent' typecheck
- name: Test run: bun run --filter '@happyview/lex-agent' test
release-oauth-client: if: >- always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (needs.changes.outputs.oauth-client == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client)) && needs.test-oauth-client.result == 'success' needs: [changes, test-oauth-client] runs-on: depot-ubuntu-24.04 permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Install dependencies run: bun install
- name: Build oauth-client run: bun run --filter '@happyview/oauth-client' build
- name: Configure npm auth for bun publish run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Release oauth-client env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/oauth-client run: npx semantic-release
release-oauth-client-browser: if: >- always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (needs.changes.outputs.oauth-client-browser == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client-browser)) && needs.test-oauth-client-browser.result == 'success' && (needs.release-oauth-client.result == 'success' || needs.changes.outputs.oauth-client != 'true') needs: [changes, test-oauth-client-browser, release-oauth-client] runs-on: depot-ubuntu-24.04 permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Install dependencies run: bun install
- name: Build SDK packages run: bun run --filter '@happyview/*' build
- name: Resolve workspace dependencies to published versions run: | if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then DIST_TAG="latest" else DIST_TAG="dev" fi CORE_VERSION=$(npm view @happyview/oauth-client@${DIST_TAG} version) node -e " const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('packages/oauth-client-browser/package.json', 'utf8')); if (pkg.dependencies['@happyview/oauth-client']?.startsWith('workspace:')) { pkg.dependencies['@happyview/oauth-client'] = '^${CORE_VERSION}'; fs.writeFileSync('packages/oauth-client-browser/package.json', JSON.stringify(pkg, null, 2) + '\n'); } "
- name: Configure npm auth for bun publish run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Release oauth-client-browser env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/oauth-client-browser run: npx semantic-release
release-oauth-client-node: if: >- always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (needs.changes.outputs.oauth-client-node == 'true' || (github.event_name == 'workflow_dispatch' && inputs.oauth-client-node)) && needs.test-oauth-client-node.result == 'success' && (needs.release-oauth-client.result == 'success' || needs.changes.outputs.oauth-client != 'true') needs: [changes, test-oauth-client-node, release-oauth-client] runs-on: depot-ubuntu-24.04 permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Install dependencies run: bun install
- name: Build SDK packages run: bun run --filter '@happyview/*' build
- name: Resolve workspace dependencies to published versions run: | if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then DIST_TAG="latest" else DIST_TAG="dev" fi CORE_VERSION=$(npm view @happyview/oauth-client@${DIST_TAG} version) node -e " const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('packages/oauth-client-node/package.json', 'utf8')); if (pkg.dependencies['@happyview/oauth-client']?.startsWith('workspace:')) { pkg.dependencies['@happyview/oauth-client'] = '^${CORE_VERSION}'; fs.writeFileSync('packages/oauth-client-node/package.json', JSON.stringify(pkg, null, 2) + '\n'); } "
- name: Configure npm auth for bun publish run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Release oauth-client-node env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/oauth-client-node run: npx semantic-release
release-lex-agent: if: >- always() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && (needs.changes.outputs.lex-agent == 'true' || (github.event_name == 'workflow_dispatch' && inputs.lex-agent)) && needs.test-lex-agent.result == 'success' && (needs.release-oauth-client.result == 'success' || needs.changes.outputs.oauth-client != 'true') needs: [changes, test-lex-agent, release-oauth-client] runs-on: depot-ubuntu-24.04 permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 0
- name: Setup Bun uses: oven-sh/setup-bun@v2
- name: Setup Node.js uses: actions/setup-node@v6 with: node-version: 24
- name: Install dependencies run: bun install
- name: Build SDK packages run: bun run --filter '@happyview/*' build
- name: Resolve workspace dependencies to published versions run: | if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then DIST_TAG="latest" else DIST_TAG="dev" fi CORE_VERSION=$(npm view @happyview/oauth-client@${DIST_TAG} version) node -e " const fs = require('fs'); const pkg = JSON.parse(fs.readFileSync('packages/lex-agent/package.json', 'utf8')); if (pkg.dependencies['@happyview/oauth-client']?.startsWith('workspace:')) { pkg.dependencies['@happyview/oauth-client'] = '^${CORE_VERSION}'; fs.writeFileSync('packages/lex-agent/package.json', JSON.stringify(pkg, null, 2) + '\n'); } "
- name: Configure npm auth for bun publish run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Release lex-agent env: GITHUB_TOKEN: ${{ secrets.DISPATCH_GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} working-directory: packages/lex-agent run: npx semantic-release
# --------------------------------------------------------------------------- # Mirror to Tangled # --------------------------------------------------------------------------- mirror: runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v6 with: fetch-depth: 0
- uses: yesolutions/mirror-action@master with: REMOTE: "git@tangled.org:gamesgamesgamesgames.games/happyview" GIT_SSH_PRIVATE_KEY: ${{ secrets.TANGLED_SSH_PRIVATE_KEY }} GIT_SSH_NO_VERIFY_HOST: "true"