-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
0 parents
commit 3ebc7c6
Showing
19 changed files
with
16,495 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,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
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 @@ | ||
github: [ nhedger ] |
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,19 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
- dependency-name: "@types/node" | ||
update-types: ["semver-major"] | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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,49 @@ | ||
name: Integrate | ||
|
||
on: | ||
push: | ||
branches: [ main, "releases/v*" ] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: true | ||
|
||
- name: Build action | ||
run: pnpm build | ||
|
||
- name: Package action | ||
run: pnpm package | ||
|
||
coding-standards: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
run_install: true | ||
|
||
- name: Run Biome | ||
run: pnpm biome ci . |
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: Test | ||
|
||
on: | ||
push: | ||
branches: [ main, "releases/v*"] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
version: [ "latest", "1.2.0" ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome CLI | ||
uses: ./ | ||
with: | ||
version: ${{ matrix.version }} | ||
- name: Test the CLI | ||
run: biome version |
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,3 @@ | ||
/.idea/ | ||
/build/ | ||
/node_modules/ |
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,25 @@ | ||
The MIT License (MIT) | ||
===================== | ||
|
||
Copyright © `2023` `Nicolas Hedger` | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the “Software”), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
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,62 @@ | ||
# Setup Biome CLI in GitHub Actions | ||
|
||
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nhedger/setup-biome?label=latest&logo=github)](https://github.com/marketplace/actions/setup-biome) | ||
[![Test](https://github.com/nhedger/setup-biome/actions/workflows/test.yaml/badge.svg)](https://github.com/nhedger/setup-biome/actions/workflows/test.yaml) | ||
[![Integrate](https://github.com/nhedger/setup-biome/actions/workflows/integrate.yaml/badge.svg)](https://github.com/nhedger/setup-biome/actions/workflows/integrate.yaml) | ||
|
||
**Setup Biome** is a GitHub action that provides a cross-platform interface | ||
for setting up the [Biome CLI](https://biomejs.dev) in GitHub | ||
Actions runners. | ||
|
||
## Inputs | ||
|
||
The following inputs are supported. | ||
|
||
```yaml | ||
- name: Setup Biome | ||
uses: nhedger/setup-biome@v1 | ||
with: | ||
|
||
# The version of the Biome CLI to install. | ||
# This input is optional and defaults to "latest". | ||
# Example values: "1.2.0", "latest" | ||
version: "latest" | ||
|
||
# The GitHub token to use to authenticate GitHub API requests. | ||
# This input is optional and defaults to the job's GitHub token. | ||
# Example value: ${{ secrets.GITHUB_TOKEN }} | ||
token: ${{ github.token }} | ||
``` | ||
## Examples | ||
### Basic example | ||
Setup the latest version of the Biome CLI. | ||
```yaml | ||
- name: Setup Biome CLI | ||
uses: nhedger/setup-biome@v1 | ||
|
||
- name: Run Biome | ||
run: biome ci . | ||
``` | ||
### Specific version | ||
Install version `1.2.0` of the Biome CLI. | ||
|
||
```yaml | ||
- name: Setup Biome CLI | ||
uses: nhedger/setup-biome@v1 | ||
with: | ||
version: 1.2.0 | ||
- name: Run Biome | ||
run: biome ci . | ||
``` | ||
|
||
## License | ||
|
||
The scripts and documentation in this project are licensed under | ||
the [MIT License](LICENSE.md). |
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,18 @@ | ||
name: Setup Biome | ||
author: nhedger | ||
description: Setup the Biome CLI in GitHub Actions | ||
branding: | ||
color: yellow | ||
icon: terminal | ||
inputs: | ||
token: | ||
description: GitHub Actions token to authenticate API requests | ||
required: true | ||
default: ${{ github.token }} | ||
version: | ||
description: The version of the Biome CLI to install | ||
required: true | ||
default: latest | ||
runs: | ||
using: 'node20' | ||
main: 'dist/index.mjs' |
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,15 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.2.2/schema.json", | ||
"files": { | ||
"ignore": ["node_modules/**/*", "dist/**/*"] | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": 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,6 @@ | ||
import { defineBuildConfig } from "unbuild"; | ||
|
||
export default defineBuildConfig({ | ||
entries: ["./src/index"], | ||
outDir: "build", | ||
}); |
Oops, something went wrong.