-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
195 additions
and
0 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 @@ | ||
* @xavidop |
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,26 @@ | ||
name: "codeql" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
analyze: | ||
name: analyze | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
security-events: write | ||
actions: read | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: lts/* | ||
- uses: github/codeql-action/init@v2 | ||
- uses: github/codeql-action/autobuild@v2 | ||
- uses: github/codeql-action/analyze@v2 |
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,14 @@ | ||
name: dependency-review | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 # v3 | ||
- uses: actions/dependency-review-action@v3 | ||
with: | ||
allow-licenses: BSD-2-Clause, BSD-3-Clause, MIT, Apache-2.0, MPL-2.0 |
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,33 @@ | ||
name: yarnci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
yarnci: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
pull-requests: read # for yarnci/yarnci-lint-action to fetch pull requests | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: lts/* | ||
- name: install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install --frozen-lockfile | ||
- name: lint | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: lint |
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,27 @@ | ||
name: Build & Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- run: yarn build | ||
- name: SonarCloud Scan | ||
if: env.SONAR_TOKEN != null | ||
uses: SonarSource/sonarcloud-github-action@v2 | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
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,58 @@ | ||
# shamelessly copied from https://github.com/sigstore/cosign/blob/main/.github/workflows/milestone.yaml | ||
|
||
name: milestone | ||
|
||
on: | ||
pull_request_target: | ||
types: [closed] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
milestone: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
actions: none | ||
checks: none | ||
contents: read | ||
deployments: none | ||
issues: write | ||
packages: none | ||
pull-requests: write | ||
repository-projects: none | ||
security-events: none | ||
statuses: none | ||
|
||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
if (!context.payload.pull_request.merged) { | ||
console.log('PR was not merged, skipping.'); | ||
return; | ||
} | ||
if (!!context.payload.pull_request.milestone) { | ||
console.log('PR has existing milestone, skipping.'); | ||
return; | ||
} | ||
milestones = await github.rest.issues.listMilestones({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'open', | ||
sort: 'due_on', | ||
direction: 'asc' | ||
}) | ||
if (milestones.data.length === 0) { | ||
console.log('There are no milestones, skipping.'); | ||
return; | ||
} | ||
await github.rest.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: context.payload.pull_request.number, | ||
milestone: milestones.data[0].number | ||
}); |
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,36 @@ | ||
name: Release | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
- next | ||
- beta | ||
- "*.x" | ||
permissions: | ||
contents: read # for checkout | ||
jobs: | ||
release: | ||
permissions: | ||
contents: write # to be able to publish a GitHub release | ||
issues: write # to be able to comment on released issues | ||
pull-requests: write # to be able to comment on released pull requests | ||
id-token: write # to enable use of OIDC for npm provenance | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: yarn | ||
node-version: lts/* | ||
- name: install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install --frozen-lockfile | ||
- run: yarn build | ||
# pinned version updated automatically by Renovate. | ||
# details at https://semantic-release.gitbook.io/semantic-release/usage/installation#global-installation | ||
- run: npx semantic-release@21.0.2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.SEMANTIC_RELEASE_BOT_NPM_TOKEN }} |