Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into analytics-module
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Mar 4, 2025
2 parents 1509809 + 51b315f commit ee7a596
Show file tree
Hide file tree
Showing 85 changed files with 3,994 additions and 2,790 deletions.
10 changes: 10 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends:
- '@commitlint/config-conventional'
rules:
subject-case:
- 0
- always
- - sentence-case
- start-case
- pascal-case
- upper-case
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# See https://git-scm.com/docs/gitattributes#_pattern_format for more about `.gitattributes`.

# Normalize EOL for all files that Git considers text files
* text=auto eol=lf

# Mark lock files as generated to avoid diffing
pnpm-lock.yaml linguist-generated
package-lock.json linguist-generated
bun.lockb linguist-generated
yarn.lock linguist-generated

# Exclude templates from language statistics
templates/**/* linguist-vendored
9 changes: 9 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set default
* @aklinker1 @Timeraa

# Secure Directories
/.github/ @aklinker1

# Creator of specific wxt modules
/packages/auto-icons/ @Timeraa
/packages/unocss/ @Timeraa
16 changes: 2 additions & 14 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# These are supported funding model platforms
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository#about-funding-files

github: [wxt-dev] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
github: wxt-dev
14 changes: 11 additions & 3 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
name: Basic Setup
description: Install PNPM, Node, and dependencies

inputs:
install:
default: 'true'
type: boolean
description: Whether or not to run 'pnpm install'

installArgs:
default: ''
type: string
description: Additional args to append to "pnpm install"

runs:
using: composite

steps:
- name: Setup PNPM
- name: 🛠️ Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup NodeJS

- name: 🛠️ Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies

- name: 📦 Install Dependencies
if: ${{ inputs.install == 'true' }}
shell: bash
run: pnpm install ${{ inputs.installArgs }}
4 changes: 1 addition & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
version: 2
updates:
- package-ecosystem: npm
directories:
- /
- packages/*
directory: /
schedule:
interval: 'monthly'
- package-ecosystem: 'github-actions'
Expand Down
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Overview

<!-- Describe your changes and why you made them -->

### Manual Testing

<!-- Describe how to test your changes to make sure the PR works as intended -->

### Related Issue

<!-- If this PR is related to an issue, please link it here -->

This PR closes #<issue_number>
22 changes: 17 additions & 5 deletions .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Publish
name: ✨ pkg.pr.new
on:
push:
branches:
Expand All @@ -7,11 +7,23 @@ on:
branches:
- main

permissions:
contents: read

jobs:
build:
name: Publish Test Packages
runs-on: ubuntu-22.04
if: ${{ github.repository == 'wxt-dev/wxt' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm buildc all
- run: pnpx pkg-pr-new publish --compact './packages/*'
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Build All Packages
run: pnpm buildc all

- name: Publish
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'
29 changes: 29 additions & 0 deletions .github/workflows/pr-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 🎉 PR closed

on:
pull_request_target:
types:
- closed

permissions:
contents: read
pull-requests: write

jobs:
thank-you:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true

steps:
- name: Post Thank You Comment
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
comment: Thanks for helping make WXT better!
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: process.env.comment
})
26 changes: 26 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🛡️ Check PR Title

on:
pull_request:
types: [opened, edited]

jobs:
lint-pr-title:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Only fetch the config file from the repository
sparse-checkout-cone-mode: false
sparse-checkout: .commitlintrc.yml

- name: Install dependencies
run: npm install --global @commitlint/config-conventional commitlint

- name: Check PR title with commitlint
env:
PR_TITLE: ${{ github.event.pull_request.title }}
HELP_URL: https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#conventional-pr-titles
run: echo "$PR_TITLE" | npx commitlint --help-url $HELP_URL
34 changes: 26 additions & 8 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docs
name: 📝 Publish Docs
on:
push:
branches:
Expand All @@ -10,20 +10,38 @@ on:
required: true
default: latest

permissions:
contents: read

jobs:
publish:
# Only run if it's the upstream repository, not forks
if: github.repository == 'wxt-dev/wxt'
name: Publish Docs
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- uses: docker/login-action@v3
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: https://${{ secrets.DOCKER_REGISTRY_HOSTNAME }}
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- run: pnpm docs:build
- run: docker build docs/.vitepress -t ${{ secrets.DOCKER_REGISTRY_HOSTNAME }}/wxt/docs:${{ github.event.inputs.tag || 'latest' }}
- run: docker push ${{ secrets.DOCKER_REGISTRY_HOSTNAME }}/wxt/docs:${{ github.event.inputs.tag || 'latest' }}
- run: curl -X POST -i ${{ secrets.UPDATE_DOCS_WEBHOOK }}

- name: Build docs
run: |
pnpm docs:build
docker build docs/.vitepress -t ${{ secrets.DOCKER_REGISTRY_HOSTNAME }}/wxt/docs:${{ github.event.inputs.tag || 'latest' }}
- name: Push Image
run: docker push ${{ secrets.DOCKER_REGISTRY_HOSTNAME }}/wxt/docs:${{ github.event.inputs.tag || 'latest' }}

- name: Deploy
run: curl -X POST -i ${{ secrets.UPDATE_DOCS_WEBHOOK }}
29 changes: 21 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: 🚀 Release
on:
workflow_dispatch:
inputs:
Expand All @@ -18,38 +18,51 @@ on:
- unocss
- wxt

permissions:
contents: read

jobs:
validate:
name: Validate
uses: './.github/workflows/validate.yml'
secrets: inherit

publish:
name: Publish
runs-on: ubuntu-22.04
permissions:
contents: write
needs:
- validate
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: ./.github/actions/setup
- name: Setup
uses: ./.github/actions/setup

- name: Configure Git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config --global push.followTags true
- name: Bump and Tag
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
pnpm tsx scripts/bump-package-version.ts ${{ inputs.package }}
git push
git push --tags
- name: NPM
- name: Publish to NPM
working-directory: packages/${{ inputs.package }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
pnpm build
pnpm publish
working-directory: packages/${{ inputs.package }}
- name: GitHub Release
- name: Create GitHub release
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 15 additions & 4 deletions .github/workflows/sync-releases.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync Releases
name: 🔄 Sync Releases
on:
workflow_dispatch:
inputs:
Expand All @@ -17,14 +17,25 @@ on:
- storage
- wxt

permissions:
contents: read

jobs:
sync:
name: Sync Releases
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
with:
installArgs: --ignore-scripts
- run: pnpm tsx scripts/sync-releases.ts ${{ inputs.package }}

- name: Sync Releases
run: pnpm tsx scripts/sync-releases.ts ${{ inputs.package }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit ee7a596

Please sign in to comment.