Skip to content

Commit

Permalink
feat(http): setup main layout and basic request functionality
Browse files Browse the repository at this point in the history
- add ui primitives
- ability to pass query params and headers
- add code block to view raw and pretty response
- add preview tab for response
- resizable pane layout and dark/light theme
- update dependencies
- fix linting errors
- build app for all four major platforms & upload assets on release
- ability to force dispatch upload/reupload of assets
- format, lint and build app on pull requests
- add caching to speed up workflows
- custom compact changelog format
  • Loading branch information
errmayank committed Jul 26, 2024
1 parent c5534c6 commit 2166dbe
Show file tree
Hide file tree
Showing 83 changed files with 3,769 additions and 2,219 deletions.
9 changes: 2 additions & 7 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "buildzaku/zaku" }],
"commit": false,
"fixed": [["**"]],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"ignore": []
"changelog": ["changesets-changelog-compact", { "repo": "buildzaku/zaku" }],
"baseBranch": "main"
}
17 changes: 17 additions & 0 deletions .changeset/ten-tigers-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"zaku": minor
---

feat(http): setup main layout and basic request functionality

- add ui primitives
- ability to pass query params and headers
- add code block to view raw and pretty response
- add preview tab for response
- resizable pane layout and dark/light theme
- update dependencies
- fix linting errors
- build app for all four major platforms & upload assets on release
- ability to force dispatch upload/reupload of assets
- format, lint and build app on pull requests
- add caching to speed up workflows
53 changes: 0 additions & 53 deletions .github/workflows/pr.yml

This file was deleted.

152 changes: 152 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: "Pull Request"

on: [pull_request]

concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
CI: "true"
NODE_VERSION: 20.16.0
PNPM_VERSION: 9.6.0

jobs:
format:
name: "Format"
if: github.repository == 'buildzaku/zaku'
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Setup pnpm"
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm

- name: "Get pnpm store directory"
id: pnpm_cache
shell: bash
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: "Setup pnpm cache"
uses: actions/cache@v4
with:
path: ${{ steps.pnpm_cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: "Install frontend dependencies"
run: pnpm install

- name: "Check format"
run: pnpm run format-check

lint:
name: "Lint"
if: github.repository == 'buildzaku/zaku'
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Setup pnpm"
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm

- name: "Get pnpm store directory"
id: pnpm_cache
shell: bash
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: "Setup pnpm cache"
uses: actions/cache@v4
with:
path: ${{ steps.pnpm_cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: "Install frontend dependencies"
run: pnpm install

- name: "Check lint"
run: pnpm run lint

build:
name: "Build"
if: github.repository == 'buildzaku/zaku'
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-latest"
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Setup pnpm"
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}

- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm

- name: "Get pnpm store directory"
id: pnpm_cache
shell: bash
run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: "Setup pnpm cache"
uses: actions/cache@v4
with:
path: ${{ steps.pnpm_cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: "Setup Rust"
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: "Setup Rust cache"
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"

- name: "Install system dependencies (Ubuntu only)"
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: "Install frontend dependencies"
run: pnpm install

- name: "Build application"
uses: tauri-apps/tauri-action@v0
with:
args: ${{ matrix.args }}
Loading

0 comments on commit 2166dbe

Please sign in to comment.