-
Notifications
You must be signed in to change notification settings - Fork 0
Add repository GitHub Actions for CI, publishing, Pages, and CodeQL #6
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
Changes from all commits
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,54 @@ | ||
| name: CodeQL Advanced | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['main', 'development'] | ||
| pull_request: | ||
| branches: ['main', 'development'] | ||
| schedule: | ||
| - cron: '23 1 * * 6' | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
| permissions: | ||
| security-events: write | ||
| packages: read | ||
| actions: read | ||
| contents: read | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - language: actions | ||
| build-mode: none | ||
| - language: javascript-typescript | ||
| build-mode: none | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v4 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
|
|
||
| - name: Run manual build steps | ||
| if: matrix.build-mode == 'manual' | ||
| shell: bash | ||
| run: | | ||
| echo 'If you are using a "manual" build mode for one or more of the' \ | ||
| 'languages you are analyzing, replace this with the commands to build' \ | ||
| 'your code, for example:' | ||
| echo ' make bootstrap' | ||
| echo ' make release' | ||
| exit 1 | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v4 | ||
| with: | ||
| category: '/language:${{ matrix.language }}' | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,68 @@ | ||||||||||
| name: Publish to npm | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| release: | ||||||||||
| types: [created] | ||||||||||
| push: | ||||||||||
| branches: [main] | ||||||||||
| workflow_dispatch: | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| build: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: oven-sh/setup-bun@v2 | ||||||||||
| with: | ||||||||||
| bun-version: '1.3.7' | ||||||||||
| - run: bun install --frozen-lockfile | ||||||||||
| - run: bun run lint:types | ||||||||||
| - run: bun test | ||||||||||
| - run: bun run build | ||||||||||
|
|
||||||||||
| build-docs: | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| permissions: | ||||||||||
| contents: read | ||||||||||
| steps: | ||||||||||
|
Comment on lines
+25
to
+29
|
||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| - uses: oven-sh/setup-bun@v2 | ||||||||||
| with: | ||||||||||
| bun-version: '1.3.7' | ||||||||||
| - run: bun install --frozen-lockfile | ||||||||||
| - run: bun run build:docs | ||||||||||
|
||||||||||
| - run: bun run build:docs | |
| - run: bun run build:docs | |
| env: | |
| DOCS_BASE: "/${{ github.event.repository.name }}/" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Test | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - '**' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - development | ||
|
Comment on lines
+6
to
+13
|
||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: '1.3.7' | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Type-check | ||
| run: bun run lint:types | ||
|
|
||
| - name: Run tests | ||
| run: bun test | ||
|
|
||
| - name: Build package | ||
| run: bun run build | ||
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.
runs-onuses a template expression that checks forswift, but the matrix only includesactionsandjavascript-typescript, so the conditional is dead code. Consider simplifying toubuntu-latestto reduce noise and avoid confusion when maintaining the workflow.