Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit b56bd93

Browse files
committed
init
1 parent 2afd190 commit b56bd93

37 files changed

Lines changed: 301 additions & 5228 deletions

.github/workflows/code-gen.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: 🔄 Generate Fern Code
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
generate_fern_go:
11+
name: Generate Fern Code (Go)
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/[email protected]
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Install Fern CLI
21+
run: npm install -g fern-api
22+
23+
- name: Generate Fern Go Code
24+
run: fern generate --group local
25+
env:
26+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
27+
28+
- name: Upload Fern Generated Code
29+
uses: actions/upload-artifact@v4
30+
with:
31+
name: fern-generated-code
32+
path: generated/
33+
retention-days: 3

.github/workflows/codeql.yml

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,98 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
112
name: 🚨 CodeQL Analysis
213

314
on:
4-
pull_request:
5-
paths:
6-
- "**.*"
15+
workflow_call:
716
push:
817
branches:
918
- develop
19+
1020
jobs:
1121
analyze:
12-
name: Analyze
13-
runs-on: ubuntu-latest
22+
name: Analyze (${{ matrix.language }})
23+
# Runner size impacts CodeQL analysis time. To learn more, please see:
24+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
25+
# - https://gh.io/supported-runners-and-hardware-resources
26+
# - https://gh.io/using-larger-runners (GitHub.com only)
27+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
28+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
1429
permissions:
30+
# required for all workflows
31+
security-events: write
32+
33+
# required to fetch internal or private CodeQL packs
34+
packages: read
35+
36+
# only required for workflows in private repositories
1537
actions: read
1638
contents: read
17-
security-events: write
1839

1940
strategy:
2041
fail-fast: false
2142
matrix:
22-
language: ["go"]
23-
43+
include:
44+
- language: actions
45+
build-mode: none
46+
- language: go
47+
build-mode: autobuild
48+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
49+
# Use `c-cpp` to analyze code written in C, C++ or both
50+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
51+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
52+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
53+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
54+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
55+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
2456
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@v3
57+
- name: Checkout repository
58+
uses: actions/checkout@v4
59+
60+
# Add any setup steps before running the `github/codeql-action/init` action.
61+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
62+
# or others). This is typically only required for manual builds.
63+
# - name: Setup runtime (example)
64+
# uses: actions/setup-example@v1
65+
66+
# Initializes the CodeQL tools for scanning.
67+
- name: Initialize CodeQL
68+
uses: github/codeql-action/init@v3
69+
with:
70+
languages: ${{ matrix.language }}
71+
build-mode: ${{ matrix.build-mode }}
72+
# If you wish to specify custom queries, you can do so here or in a config file.
73+
# By default, queries listed here will override any specified in a config file.
74+
# Prefix the list here with "+" to use these queries and those in the config file.
2775

28-
# Initializes the CodeQL tools for scanning.
29-
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v3
31-
with:
32-
languages: ${{ matrix.language }}
76+
# 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
77+
# queries: security-extended,security-and-quality
3378

34-
- name: Autobuild
35-
uses: github/codeql-action/autobuild@v3
79+
# If the analyze step fails for one of the languages you are analyzing with
80+
# "We were unable to automatically build your code", modify the matrix above
81+
# to set the build mode to "manual" for that language. Then modify this step
82+
# to build your code.
83+
# ℹ️ Command-line programs to run using the OS shell.
84+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
85+
- if: matrix.build-mode == 'manual'
86+
shell: bash
87+
run: |
88+
echo 'If you are using a "manual" build mode for one or more of the' \
89+
'languages you are analyzing, replace this with the commands to build' \
90+
'your code, for example:'
91+
echo ' make bootstrap'
92+
echo ' make release'
93+
exit 1
3694
37-
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v3
95+
- name: Perform CodeQL Analysis
96+
uses: github/codeql-action/analyze@v3
97+
with:
98+
category: "/language:${{matrix.language}}"

.github/workflows/mkdocs-develop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
name: 📖 Deploy Dev Docs
2+
23
on:
34
push:
45
paths:
56
- "docs/**"
67
- "mkdocs.yml"
78
branches:
89
- develop
10+
911
jobs:
1012
build-documents:
1113
name: Test Documentation Build
@@ -17,6 +19,7 @@ jobs:
1719
uses: actions/[email protected]
1820
with:
1921
fetch-depth: 0
22+
2023
- name: Configure Git Credentials
2124
run: |
2225
git config user.name github-actions[bot]
@@ -31,11 +34,14 @@ jobs:
3134
path: .cache
3235
restore-keys: |
3336
mkdocs-material-
37+
3438
- name: Install dependencies
3539
run: |
3640
python -m pip install --upgrade pip setuptools wheel
3741
pip install -r docs/build/requirements.txt
42+
3843
- name: Test Build
3944
run: mkdocs build --verbose --strict
45+
4046
- name: Deploy Docs
4147
run: mkdocs gh-deploy --force

.github/workflows/pr-review.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: 🔍 PR Review
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "**.*"
7+
push:
8+
branches:
9+
- develop
10+
11+
permissions:
12+
id-token: write
13+
packages: write
14+
contents: write
15+
security-events: write
16+
actions: read
17+
18+
jobs:
19+
code-gen:
20+
name: 🔄 Generate Fern Code
21+
uses: ./.github/workflows/code-gen.yml
22+
secrets: inherit
23+
24+
codeql:
25+
name: 🚨 CodeQL Analysis
26+
uses: ./.github/workflows/codeql.yml
27+
secrets: inherit
28+
29+
test-build:
30+
name: 🔨 Test Build
31+
uses: ./.github/workflows/test-build.yml
32+
needs: code-gen
33+
secrets: inherit
34+
35+
test-docs:
36+
name: 📙 Test docs
37+
uses: ./.github/workflows/test-docs.yml
38+
secrets: inherit
39+
40+
test-publish:
41+
name: 🎉 Test Publish
42+
uses: ./.github/workflows/test-publish.yml
43+
secrets: inherit
44+
45+
verify:
46+
name: 🙏🏻 Verify
47+
uses: ./.github/workflows/verify.yml
48+
needs: code-gen
49+
secrets: inherit
50+
51+
check:
52+
name: ✅ Check
53+
if: always()
54+
needs:
55+
- codeql
56+
- test-build
57+
- test-docs
58+
- test-publish
59+
- verify
60+
61+
runs-on: ubuntu-latest
62+
63+
steps:
64+
- name: Require all jobs to succeed
65+
uses: re-actors/alls-green@release/v1
66+
with:
67+
jobs: ${{ toJSON(needs) }}

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 🎉 Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "*" # Trigger on all tags
7+
8+
permissions:
9+
id-token: write
10+
packages: write
11+
contents: write
12+
security-events: write
13+
actions: read
14+
15+
jobs:
16+
release:
17+
name: 🎉 Release
18+
uses: ./.github/workflows/release.yml
19+
secrets: inherit
20+
21+
publish:
22+
name: 🎉 Publish
23+
if: always()
24+
needs: release
25+
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Require all jobs to succeed
30+
uses: re-actors/alls-green@release/v1
31+
with:
32+
jobs: ${{ toJSON(needs) }}

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
name: 🎉 Release
22

33
on:
4-
push:
5-
tags:
6-
- "*"
4+
workflow_call:
75

86
jobs:
97
release:
108
name: Release
119
uses: ./.github/workflows/reusable-build.yml
1210
with:
1311
goreleaser_config: goreleaser.yml
14-
goreleaser_options: ""
12+
goreleaser_options: "--clean"
1513
secrets: inherit
1614
permissions:
1715
id-token: write # For cosign
1816
packages: write # For GHCR
1917
contents: write # To upload archives as release assets
18+
2019
publish:
2120
name: Publish PyPi
2221
runs-on: ubuntu-latest
2322
steps:
2423
- name: Checkout code
2524
uses: actions/checkout@v3
25+
2626
- name: Setup Node
2727
uses: actions/setup-node@v4
28+
2829
- name: Install Fern
2930
run: npm install -g fern-api
31+
3032
- name: Generate Fern
31-
run: fern generate --group pypi --version ${{ github.ref_name }}
33+
run: fern generate --group pypi --version ${{ github.ref_name }}
3234
env:
3335
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
3436
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
37+
3538
permissions:
3639
id-token: write # For cosign
3740
packages: write # For GHCR

0 commit comments

Comments
 (0)