-
-
Notifications
You must be signed in to change notification settings - Fork 0
Release 1 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 1 #2
Changes from all commits
4f7df9e
6431b01
d28be17
7c3a17f
d60276e
fb999af
66b9737
eadd677
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: CI/Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| env: | ||
| NODE_VERSION: '20' | ||
|
|
||
| jobs: | ||
| # ─── CI (runs on every push) ───────────────────────────── | ||
| ci: | ||
| name: Build & Test | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build CLI | ||
| run: npm run build | ||
|
|
||
| - name: Typecheck | ||
| run: npm run typecheck | ||
|
Comment on lines
+34
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== root package.json scripts =="
jq '.scripts' package.json
echo "== desktop-app package.json scripts =="
jq '.scripts' desktop-app/package.json
echo "== desktop TypeScript configs =="
jq '{include, references, compilerOptions}' desktop-app/tsconfig.json desktop-app/tsconfig.node.jsonRepository: Renderdragonorg/Osmium Length of output: 1254 🏁 Script executed: wc -l .github/workflows/release.ymlRepository: Renderdragonorg/Osmium Length of output: 99 🏁 Script executed: sed -n '95,110p' .github/workflows/release.ymlRepository: Renderdragonorg/Osmium Length of output: 555 🏁 Script executed: cat -n desktop-app/tsconfig.json | head -20Repository: Renderdragonorg/Osmium Length of output: 726 🏁 Script executed: fd 'vite.config' desktop-appRepository: Renderdragonorg/Osmium Length of output: 101 🏁 Script executed: cat -n desktop-app/vite.config.ts 2>/dev/null || cat -n desktop-app/vite.config.js 2>/dev/null || echo "No vite config found"Repository: Renderdragonorg/Osmium Length of output: 86 🏁 Script executed: cat -n desktop-app/electron.vite.config.tsRepository: Renderdragonorg/Osmium Length of output: 1184 🏁 Script executed: cat -n .github/workflows/release.ymlRepository: Renderdragonorg/Osmium Length of output: 3806 Add a typecheck step for the desktop app in the CI and desktop release workflows. The root typecheck (lines 34-35) only validates the root project. The desktop-app has its own Add 🤖 Prompt for AI Agents |
||
|
|
||
| # ─── CLI Release (v* tags only) ────────────────────────── | ||
| release-cli: | ||
| name: Release CLI | ||
| needs: ci | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build CLI | ||
| run: npm run build | ||
|
|
||
| - name: Package tarball | ||
| run: npm pack | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: '*.tgz' | ||
| generate_release_notes: true | ||
|
|
||
| # ─── Desktop Release ─────────────────────────────────── | ||
| release-desktop: | ||
| name: Desktop (${{ matrix.os }}) | ||
| needs: ci | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: windows-latest | ||
| build-flag: --win | ||
| - os: macos-latest | ||
| build-flag: --mac | ||
| - os: ubuntu-latest | ||
| build-flag: --linux | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
|
|
||
| # 1. Build CLI first (desktop app bundles it via extraResources) | ||
| - name: Install CLI dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build CLI | ||
| run: npm run build | ||
|
|
||
| # 2. Build Desktop app | ||
| - name: Install Desktop dependencies | ||
| working-directory: desktop-app | ||
| run: npm ci | ||
|
|
||
| - name: Build Desktop (electron-vite) | ||
| working-directory: desktop-app | ||
| env: | ||
| CONVEX_URL: ${{ secrets.CONVEX_URL }} | ||
| run: npm run build | ||
|
|
||
| # 3. Package with electron-builder | ||
| - name: Package Desktop | ||
| working-directory: desktop-app | ||
| run: npx electron-builder ${{ matrix.build-flag }} --publish never | ||
|
|
||
| # 4. Upload installers to the release | ||
| - name: Upload to GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| files: | | ||
| desktop-app/dist/*.exe | ||
| desktop-app/dist/*.dmg | ||
| desktop-app/dist/*.AppImage | ||
| desktop-app/dist/*.deb | ||
| desktop-app/dist/*.zip | ||
| desktop-app/dist/*.tar.gz | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Welcome to your Convex functions directory! | ||
|
|
||
| Write your Convex functions here. | ||
| See https://docs.convex.dev/functions for more. | ||
|
|
||
| A query function that takes two arguments looks like: | ||
|
|
||
| ```ts | ||
| // convex/myFunctions.ts | ||
| import { query } from "./_generated/server"; | ||
| import { v } from "convex/values"; | ||
|
|
||
| export const myQueryFunction = query({ | ||
| // Validators for arguments. | ||
| args: { | ||
| first: v.number(), | ||
| second: v.string(), | ||
| }, | ||
|
|
||
| // Function implementation. | ||
| handler: async (ctx, args) => { | ||
| // Read the database as many times as you need here. | ||
| // See https://docs.convex.dev/database/reading-data. | ||
| const documents = await ctx.db.query("tablename").collect(); | ||
|
|
||
| // Arguments passed from the client are properties of the args object. | ||
| console.log(args.first, args.second); | ||
|
|
||
| // Write arbitrary JavaScript here: filter, aggregate, build derived data, | ||
| // remove non-public properties, or create new objects. | ||
| return documents; | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| Using this query function in a React component looks like: | ||
|
|
||
| ```ts | ||
| const data = useQuery(api.myFunctions.myQueryFunction, { | ||
| first: 10, | ||
| second: "hello", | ||
| }); | ||
| ``` | ||
|
|
||
| A mutation function looks like: | ||
|
|
||
| ```ts | ||
| // convex/myFunctions.ts | ||
| import { mutation } from "./_generated/server"; | ||
| import { v } from "convex/values"; | ||
|
|
||
| export const myMutationFunction = mutation({ | ||
| // Validators for arguments. | ||
| args: { | ||
| first: v.string(), | ||
| second: v.string(), | ||
| }, | ||
|
|
||
| // Function implementation. | ||
| handler: async (ctx, args) => { | ||
| // Insert or modify documents in the database here. | ||
| // Mutations can also read from the database like queries. | ||
| // See https://docs.convex.dev/database/writing-data. | ||
| const message = { body: args.first, author: args.second }; | ||
| const id = await ctx.db.insert("messages", message); | ||
|
|
||
| // Optionally, return a value from your mutation. | ||
| return await ctx.db.get("messages", id); | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| Using this mutation function in a React component looks like: | ||
|
|
||
| ```ts | ||
| const mutation = useMutation(api.myFunctions.myMutationFunction); | ||
| function handleButtonPress() { | ||
| // fire and forget, the most common way to use mutations | ||
| mutation({ first: "Hello!", second: "me" }); | ||
| // OR | ||
| // use the result once the mutation has completed | ||
| mutation({ first: "Hello!", second: "me" }).then((result) => | ||
| console.log(result), | ||
| ); | ||
| } | ||
| ``` | ||
|
|
||
| Use the Convex CLI to push your functions to a deployment. See everything | ||
| the Convex CLI can do by running `npx convex -h` in your project root | ||
| directory. To learn more, launch the docs with `npx convex docs`. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* eslint-disable */ | ||
| /** | ||
| * Generated `api` utility. | ||
| * | ||
| * THIS CODE IS AUTOMATICALLY GENERATED. | ||
| * | ||
| * To regenerate, run `npx convex dev`. | ||
| * @module | ||
| */ | ||
|
|
||
| import type * as secrets from "../secrets.js"; | ||
|
|
||
| import type { | ||
| ApiFromModules, | ||
| FilterApi, | ||
| FunctionReference, | ||
| } from "convex/server"; | ||
|
|
||
| declare const fullApi: ApiFromModules<{ | ||
| secrets: typeof secrets; | ||
| }>; | ||
|
|
||
| /** | ||
| * A utility for referencing Convex functions in your app's public API. | ||
| * | ||
| * Usage: | ||
| * ```js | ||
| * const myFunctionReference = api.myModule.myFunction; | ||
| * ``` | ||
| */ | ||
| export declare const api: FilterApi< | ||
| typeof fullApi, | ||
| FunctionReference<any, "public"> | ||
| >; | ||
|
|
||
| /** | ||
| * A utility for referencing Convex functions in your app's internal API. | ||
| * | ||
| * Usage: | ||
| * ```js | ||
| * const myFunctionReference = internal.myModule.myFunction; | ||
| * ``` | ||
| */ | ||
| export declare const internal: FilterApi< | ||
| typeof fullApi, | ||
| FunctionReference<any, "internal"> | ||
| >; | ||
|
|
||
| export declare const components: {}; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* eslint-disable */ | ||
| /** | ||
| * Generated `api` utility. | ||
| * | ||
| * THIS CODE IS AUTOMATICALLY GENERATED. | ||
| * | ||
| * To regenerate, run `npx convex dev`. | ||
| * @module | ||
| */ | ||
|
|
||
| import { anyApi, componentsGeneric } from "convex/server"; | ||
|
|
||
| /** | ||
| * A utility for referencing Convex functions in your app's API. | ||
| * | ||
| * Usage: | ||
| * ```js | ||
| * const myFunctionReference = api.myModule.myFunction; | ||
| * ``` | ||
| */ | ||
| export const api = anyApi; | ||
| export const internal = anyApi; | ||
| export const components = componentsGeneric(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| /* eslint-disable */ | ||
| /** | ||
| * Generated data model types. | ||
| * | ||
| * THIS CODE IS AUTOMATICALLY GENERATED. | ||
| * | ||
| * To regenerate, run `npx convex dev`. | ||
| * @module | ||
| */ | ||
|
|
||
| import { AnyDataModel } from "convex/server"; | ||
| import type { GenericId } from "convex/values"; | ||
|
|
||
| /** | ||
| * No `schema.ts` file found! | ||
| * | ||
| * This generated code has permissive types like `Doc = any` because | ||
| * Convex doesn't know your schema. If you'd like more type safety, see | ||
| * https://docs.convex.dev/using/schemas for instructions on how to add a | ||
| * schema file. | ||
| * | ||
| * After you change a schema, rerun codegen with `npx convex dev`. | ||
| */ | ||
|
|
||
| /** | ||
| * The names of all of your Convex tables. | ||
| */ | ||
| export type TableNames = string; | ||
|
|
||
| /** | ||
| * The type of a document stored in Convex. | ||
| */ | ||
| export type Doc = any; | ||
|
|
||
| /** | ||
| * An identifier for a document in Convex. | ||
| * | ||
| * Convex documents are uniquely identified by their `Id`, which is accessible | ||
| * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids). | ||
| * | ||
| * Documents can be loaded using `db.get(tableName, id)` in query and mutation functions. | ||
| * | ||
| * IDs are just strings at runtime, but this type can be used to distinguish them from other | ||
| * strings when type checking. | ||
| */ | ||
| export type Id<TableName extends TableNames = TableNames> = | ||
| GenericId<TableName>; | ||
|
|
||
| /** | ||
| * A type describing your Convex data model. | ||
| * | ||
| * This type includes information about what tables you have, the type of | ||
| * documents stored in those tables, and the indexes defined on them. | ||
| * | ||
| * This type is used to parameterize methods like `queryGeneric` and | ||
| * `mutationGeneric` to make them type-safe. | ||
| */ | ||
| export type DataModel = AnyDataModel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scope
contents: writeto the release jobs only.These permissions apply to every job, including
cion every branch push. That gives install/build steps a write-capableGITHUB_TOKENwhen they only need read access.Proposed fix
🤖 Prompt for AI Agents