This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ossf-scorecard
- Loading branch information
Showing
69 changed files
with
3,111 additions
and
1,261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '33 1 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners | ||
# Consider using larger runners for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript-typescript' ] | ||
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] | ||
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both | ||
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both | ||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
# queries: security-extended,security-and-quality | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:${{matrix.language}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Create GH Release | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
# Allow only one concurrent deployment,but do NOT cancel in-progress runs as | ||
# we want to allow these release deployments to complete. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
create-release: | ||
# a gh release will be created in the following conditions: | ||
# 1. if it is a manual trigger (workflow_dispatch) | ||
# 2. if the workflow was triggered by a merged changeset PR | ||
if: | | ||
(github.event_name == 'workflow_dispatch' || | ||
(github.event.pull_request.merged == true && | ||
(github.event.pull_request.head.ref == 'changeset-release/main' || | ||
contains(github.event.pull_request.labels.*.name, 'automated-release')))) | ||
name: Create GH Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Check if GitHub repo package version is latest | ||
run: | | ||
# get any package version from the repo | ||
cd packages/protocol # assumption that all packages have the same version | ||
# Fetch the version in the GitHub repo's package.json file. | ||
REPO_VERSION=$(node -p "require('./package.json').version") | ||
echo "REPO_VERSION=$REPO_VERSION" >> $GITHUB_ENV | ||
echo "Repo Version: $REPO_VERSION" | ||
shell: bash | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: v${{ env.REPO_VERSION }} | ||
tag_name: v${{ env.REPO_VERSION }} | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Docs Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
CI: true | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
|
||
jobs: | ||
tbdocs-reporter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build all workspace packages | ||
run: pnpm build | ||
|
||
- name: TBDocs Reporter | ||
id: tbdocs-reporter-protocol | ||
uses: TBD54566975/tbdocs@main | ||
with: | ||
group_docs: true | ||
entry_points: | | ||
- file: packages/protocol/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- file: packages/http-client/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- file: packages/http-server/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- name: Upload documentation artifacts | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3 | ||
with: | ||
name: tbdocs-reporter-output | ||
path: ./.tbdocs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Workflow that deploys project documentation to GitHub Pages | ||
name: Publish Docs to GH Pages | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Create GH Release"] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build-docs: | ||
permissions: | ||
contents: write # to write documentation files to the repo | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build all workspace packages | ||
run: pnpm build | ||
|
||
- name: TBDocs Reporter | ||
id: tbdocs-reporter-protocol | ||
uses: TBD54566975/tbdocs@main | ||
with: | ||
group_docs: true | ||
fail_on_error: true | ||
entry_points: | | ||
- file: packages/protocol/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- file: packages/http-client/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- file: packages/http-server/src/main.ts | ||
docsReporter: api-extractor | ||
docsGenerator: typedoc-html | ||
- name: Upload documentation artifacts | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 #v3.1.3 | ||
with: | ||
name: tbdocs-output | ||
path: ./.tbdocs | ||
|
||
deploy-gh-pages: | ||
# Add a dependency to the build job | ||
needs: build-docs | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
contents: read # to read from project repo | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Download TBDocs Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: tbdocs-output | ||
path: ./tbdocs | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: "./tbdocs/docs" | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
Oops, something went wrong.