Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ updates:
directory: /
schedule:
interval: weekly
# Let ecosystem fixes settle before routine version PRs. Dependabot
# security updates are explicitly not delayed by this setting.
cooldown:
default-days: 7
groups:
ccusage-runtime:
patterns:
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,24 @@ on:
- "apps/desktop/src-tauri/tauri.conf.json"
workflow_dispatch:

permissions:
contents: write
actions: write
permissions: {}

concurrency:
group: auto-release-${{ github.ref }}
cancel-in-progress: false

jobs:
publish:
name: Publish release and dispatch build
runs-on: ubuntu-latest
permissions:
contents: write # Create the versioned GitHub release.
actions: write # Dispatch the separate signed-build workflow.
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 0
persist-credentials: false

- name: Read version from tauri.conf.json
id: ver
Expand All @@ -50,12 +53,13 @@ jobs:
id: check
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ steps.ver.outputs.tag }}
run: |
set -euo pipefail
if gh release view "${{ steps.ver.outputs.tag }}" \
if gh release view "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
echo "Release ${{ steps.ver.outputs.tag }} already exists — skipping."
echo "Release $RELEASE_TAG already exists — skipping."
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
Expand All @@ -64,21 +68,23 @@ jobs:
if: steps.check.outputs.exists != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ steps.ver.outputs.tag }}
run: |
set -euo pipefail
gh release create "${{ steps.ver.outputs.tag }}" \
gh release create "$RELEASE_TAG" \
--repo "$GITHUB_REPOSITORY" \
--target "$GITHUB_SHA" \
--title "CodeVetter ${{ steps.ver.outputs.tag }}" \
--title "CodeVetter $RELEASE_TAG" \
--generate-notes

- name: Dispatch release build workflow
if: steps.check.outputs.exists != 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ steps.ver.outputs.tag }}
run: |
set -euo pipefail
gh workflow run release.yml \
--repo "$GITHUB_REPOSITORY" \
--ref main \
-f tag="${{ steps.ver.outputs.tag }}"
-f tag="$RELEASE_TAG"
70 changes: 63 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,72 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
inputs:
native_qualification:
description: "Run isolated native macOS qualification"
required: true
default: false
type: boolean
native_interaction:
description: "Include XCUITest on the isolated hosted desktop"
required: true
default: false
type: boolean
native_production_qualification:
description: "Run protected signing, notarization, and migration qualification"
required: true
default: false
type: boolean
permissions: {}

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
native-qualification:
name: Native macOS qualification
if: >-
github.event_name == 'pull_request' ||
(github.event_name == 'workflow_dispatch' && inputs.native_qualification)
uses: ./.github/workflows/native-qualification.yml
with:
run_interaction: ${{ github.event_name == 'pull_request' || inputs.native_interaction }}
permissions:
contents: read

native-production-qualification:
name: Native macOS production-candidate qualification
if: github.event_name == 'workflow_dispatch' && inputs.native_production_qualification
uses: ./.github/workflows/native-production-qualification.yml
secrets:
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
SPARKLE_EDDSA_PRIVATE_KEY: ${{ secrets.SPARKLE_EDDSA_PRIVATE_KEY }}
SPARKLE_EDDSA_PUBLIC_KEY: ${{ secrets.SPARKLE_EDDSA_PUBLIC_KEY }}
permissions:
contents: read

lint-and-typecheck:
name: Lint, test, and build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 2
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
persist-credentials: false
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '22'
cache: 'pnpm'
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
- name: Install Tauri Linux dependencies
run: |
sudo apt-get update
Expand All @@ -25,7 +78,7 @@ jobs:
libayatana-appindicator3-dev \
librsvg2-dev \
libxdo-dev
- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: apps/desktop/src-tauri
- name: Install Dependencies
Expand All @@ -35,7 +88,9 @@ jobs:
run: pnpm run lint
- name: Fetch code-health base
if: github.event_name != 'workflow_dispatch'
run: git fetch --depth=1 origin ${{ github.event.pull_request.base.sha || github.event.before || 'HEAD^' }}
env:
CODE_HEALTH_BASE: ${{ github.event.pull_request.base.sha || github.event.before || 'HEAD^' }}
run: git fetch --depth=1 origin "$CODE_HEALTH_BASE"
- name: Code health
env:
CODE_HEALTH_BASE: ${{ github.event.pull_request.base.sha || github.event.before || 'HEAD^' }}
Expand Down Expand Up @@ -83,7 +138,8 @@ jobs:
run: |
pnpm run test:ccusage-sidecar
pnpm run prepare:ccusage-sidecar
src-tauri/binaries/ccusage-$(rustc -vV | sed -n 's/^host: //p') --version
CCUSAGE_TARGET="$(rustc -vV | sed -n 's/^host: //p')"
"src-tauri/binaries/ccusage-$CCUSAGE_TARGET" --version
- name: Qualify CLI artifact
working-directory: apps/desktop
run: |
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/deploy-landing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,31 @@ name: Deploy Landing Page
# apps/landing-page-astro/.
on:
workflow_dispatch:
permissions:
contents: read
deployments: write

permissions: {}

concurrency:
group: deploy-landing-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
name: Build and deploy landing page
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
deployments: write # Record the Cloudflare Pages deployment.
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false

- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
cache: pnpm
package-manager-cache: false

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -58,7 +63,7 @@ jobs:

- name: Deploy to Cloudflare Pages
if: steps.cloudflare.outputs.deploy_enabled == 'true'
uses: cloudflare/wrangler-action@v3
uses: cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ on: [push, pull_request]
permissions:
contents: read

concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
name: Validate documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: "22"
- name: Validate docs (links, frontmatter, structure)
Expand Down
Loading
Loading