Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nhedger committed Aug 21, 2024
1 parent db12dbe commit 8e4c29d
Show file tree
Hide file tree
Showing 13 changed files with 467 additions and 7 deletions.
65 changes: 65 additions & 0 deletions .git-cliff/release-notes.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[changelog]
header = ""
body = """
{% for commit in commits %}
{% if commit.github.pr_title -%}
{%- set commit_message = commit.github.pr_title -%}
{%- else -%}
{%- set commit_message = commit.message -%}
{%- endif -%}
- {{ commit_message | split(pat="\n") | first | trim }}\
{% if commit.github.username %} by @{{ commit.github.username }}{%- endif -%}
{% if commit.github.pr_number %} in \
[#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}) \
{%- endif %}
{%- endfor -%}
{%- if github -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
{% raw %}\n{% endraw -%}
## New Contributors
{%- endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
- @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{%- endif -%}
{% if version %}
{% if previous.version %}
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
{% endif %}
{% else -%}
{% raw %}\n{% endraw %}
{% endif %}
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
"""
footer = ""
trim = true

[git]
conventional_commits = true
filter_unconventional = true
split_commits = false
commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^perf", group = "<!-- 3 -->⚡ Performance" },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 4 -->⚙️ Miscellaneous" },
{ message = "^revert", group = "<!-- 5 -->◀️ Revert" },
]
sort_commits = "oldest"

[bump]
initial_tag = "0.1.0"

[remote.github]
owner = "biomejs"
repo = "biome-vscode"
76 changes: 76 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 🐛 Bug report
description: Report an issue with the Biome VS Code extension
title: "🐛 "
labels: ["Triage"]
body:
- type: input
attributes:
label: "VS Code version"
description: Version of VS Code
placeholder: "1.86.1"
validations:
required: true
- type: input
attributes:
label: "Extension version"
description: Version of Biome VS Code extension.
placeholder: "2.0.0"
validations:
required: true
- type: input
attributes:
label: "Biome version"
description: The version of Biome that the extension is using. Can be found in the status bar.
placeholder: "1.5.3"
validations:
required: true
- type: checkboxes
attributes:
label: "Operating system"
description: Check all operating systems on which you have observed the issue.
options:
- label: "Windows"
required: false
- label: "macOS"
required: false
- label: "Linux"
required: false
- type: textarea
attributes:
label: "Description"
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: "Steps to reproduce"
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
attributes:
label: "Expected behavior"
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: dropdown
attributes:
label: "Does this issue occur when using the CLI directly?"
options: ["Yes", "No", "Not sure / Not applicable"]
default: 2
validations:
required: true
- type: textarea
attributes:
label: "Logs"
description: |
If applicable, include the biome trace logs. To find these logs, open the output panel and select the Biome Trace category. Try to only include the logs that are relevant to the issue.
Alternatively, if you have the CLI installed, you can run `biome rage --daemon-logs` to retrieve the logs emitted by the daemon. Usually, these logs contain more information, but they are way more verbose.
render: plain text
placeholder: "Biome trace logs can be found in the output panel under the Biome Trace category"
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: 💡 Feature requests
url: https://github.com/biomejs/biome-vscode/discussions/new
about: Please use a new GitHub discussion to propose ideas of feature requests.
- name: 🗣️ Chat
url: https://discord.gg/BypW39g6Yc
about: Our Discord server is active and is used for real-time discussions including contribution collaboration, questions, and more!
- name: 🆘 Support
url: https://discord.gg/BypW39g6Yc
about: "For assistance, please use the #help channel on our Discord community."
13 changes: 6 additions & 7 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
branches: [main]

# Check quality of the code
jobs:
quality:
name: Quality
runs-on: ubuntu-latest
Expand All @@ -17,7 +15,8 @@ jobs:
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- name: Run Biome
- name: Run Biome checks
run: biome ci --reporter=github


package:
name: Package
uses: ./.github/workflows/~package-stable.yaml
28 changes: 28 additions & 0 deletions .github/workflows/release-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow is responsible for releasing a new nightly version of the
# extension. It is meant to be triggered manually.

name: Release new nightly version

on:
workflow_dispatch:

jobs:
generate-nightly-version:
name: Generate nightly version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.generate-nightly-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate nightly version
id: generate-nightly-version
run: |
version=$(date +"%Y.%-m.%-d%H%M")
echo "version=$version" >> $GITHUB_OUTPUT
publish:
name: Release nightly
needs: [generate-nightly-version]
uses: ./.github/workflows/~publish-nightly.yaml
with:
version: ${{ needs.generate-nightly-version.outputs.version }}
53 changes: 53 additions & 0 deletions .github/workflows/release-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow is responsible for releasing a new stable version of the
# extension. It is meant to be triggered manually and will automatically
# determine the next version number based on the commit history, which it will
# use to create a new tag. Publication of the new version will be handled by
# the `publish-stable.yaml` workflows.

name: Release new stable version

on:
workflow_dispatch:

jobs:
tag:
name: Tag stable
runs-on: ubuntu-latest
permissions: write-all
outputs:
version: ${{ steps.next-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up git-cliff
uses: kenji-miyake/setup-git-cliff@v2
- name: Determine next version
id: next-version
run: |
version=$(git-cliff \
--bumped-version \
--config .git-cliff/release-notes.toml)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Patch package.json version with stable identifier
run: |
jq \
--arg version "${{ steps.next-version.outputs.version }}" \
--tab '.version = $version' \
package.json > package.json.tmp \
&& mv package.json.tmp package.json
# - name: Commit, tag, and push
# run: |
# git config user.name "GitHub Actions"
# git config user.email "actions@github.com"
# git add package.json
# git commit -m "chore(release): v${{ steps.next-version.outputs.version }}"
# git tag v${{ steps.next-version.outputs.version }}
# git push --follow-tags

publish:
name: Publish
needs: [tag]
uses: ./.github/workflows/~publish-stable.yaml
with:
version: ${{ needs.tag.outputs.version }}
38 changes: 38 additions & 0 deletions .github/workflows/~package-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow is responsible for packaging the extension as a VSIX artifact
# for the nightly release.
name: ~Package nightly release

on:
workflow_call:
inputs:
version:
required: true
type: string

jobs:
package:
name: Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Build
run: pnpm run build
- name: Patch package.json version with nightly identifier
run: |
jq \
--arg version "${{ inputs.version }}" \
--tab '.version = $version' \
package.json > package.json.tmp \
&& mv package.json.tmp package.json
- name: Package VSIX
run: pnpm vsce package --pre-release -o biome.vsix
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: biome.vsix
path: biome.vsix
27 changes: 27 additions & 0 deletions .github/workflows/~package-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow is responsible for packaging the extension as a VSIX artifact
# for the stable release.
name: ~Package stable release

on:
workflow_call:

jobs:
package:
name: Package stable release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
run_install: true
- name: Build
run: pnpm run build
- name: Package VSIX
run: pnpm vsce package -o biome.vsix
- name: Upload the artifact
uses: actions/upload-artifact@v4
with:
name: biome.vsix
path: biome.vsix
31 changes: 31 additions & 0 deletions .github/workflows/~publish-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is responsible for publishing nightly releases of the extension
# to the Visual Studio Marketplace, the Open VSX Registry. It is triggered
# manually by the user.

name: ~Publish nightly release

on:
workflow_call:
inputs:
version:
required: true
type: string

jobs:
package:
name: Package
uses: ./.github/workflows/~package-nightly.yaml
with:
version: ${{ inputs.version }}
# publish-to-vs-marketplace:
# needs: [package]
# name: Publish to Visual Studio Marketplace
# uses: ./.github/workflows/~publish-to-vs-marketplace.yaml
# with:
# channel: nightly
# publish-to-ovsx-registry:
# needs: [package]
# name: Publish to Visual Studio Marketplace
# uses: ./.github/workflows/~publish-to-ovsx-registry.yaml
# with:
# channel: nightly
Loading

0 comments on commit 8e4c29d

Please sign in to comment.