-
Notifications
You must be signed in to change notification settings - Fork 10
chore: open source setup #3
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
763b5bf
2f8850d
1e813f8
9c51d9b
f0afd5e
65aba46
219526f
ac21e07
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,28 @@ | ||
| name: Node.js CI | ||
|
|
||
| on: [pull_request] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| lfs: true | ||
| - name: Use Node.js | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: '22.14.0' | ||
| cache: 'npm' | ||
| - name: Update npm | ||
| run: npm install -g npm@11.6.4 | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Build | ||
| run: npm run build | ||
| - name: Lint | ||
| run: npm run lint | ||
| - name: Tests Typecheck | ||
| run: npm run test:typecheck | ||
| - name: Test | ||
| run: npm test |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| name: release-please | ||
|
|
||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4 | ||
| id: release | ||
| with: | ||
| token: ${{ secrets.REPO_GH_PAT }} | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json | ||
|
|
||
| - name: Checkout Repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| if: steps.release.outputs.paths_released != '[]' | ||
| with: | ||
| lfs: true | ||
| - name: Setup Node | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| if: steps.release.outputs.paths_released != '[]' | ||
| with: | ||
| node-version: 22.14.0 | ||
| registry-url: 'https://registry.npmjs.org' | ||
| always-auth: true | ||
| - name: Build | ||
| if: steps.release.outputs.paths_released != '[]' | ||
| run: | | ||
| npm install -g npm@11.6.4 | ||
| npm ci | ||
| npm run build | ||
| - name: Publish | ||
| if: steps.release.outputs.paths_released != '[]' | ||
| run: | | ||
| npm run publish-release | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| name: "Check PR title" | ||||||
|
|
||||||
| on: | ||||||
| pull_request_target: | ||||||
| types: | ||||||
| - opened | ||||||
| - reopened | ||||||
| - edited | ||||||
| - synchronize | ||||||
|
|
||||||
| permissions: | ||||||
| pull-requests: read | ||||||
|
|
||||||
| jobs: | ||||||
| main: | ||||||
| name: Validate PR title | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5 | ||||||
| env: | ||||||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
| with: | ||||||
| scopes: | | ||||||
| ^[A-Z]{3}-\d+ | ||||||
| deps | ||||||
| deps-dev | ||||||
| workflow | ||||||
| requireScope: true | ||||||
|
||||||
| requireScope: true | |
| requireScope: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| ".": "0.3.1" | ||
| } |
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.
Workflow permissions include
id-token: write, but this job doesn't appear to use OIDC/token minting. Consider removing unused permissions (and documenting the requiredREPO_GH_PATsecret) to keep the workflow least-privilege and reduce maintenance surprises if the secret isn't set in the repo.