Skip to content
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

feat: implement and release 1.0.0 #1

Merged
merged 8 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version-file: .node-version
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Lint
run: pnpm run lint

- name: Format
run: pnpm run format

- name: Build
run: pnpm run build
83 changes: 83 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest

env:
RELEASE_VERSION: null
MANIFEST_VERSION: null
EXTENSION_NAME: null
OUTDIR: .output

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set extension name
run: |
NAME=$(jq -r '.name' package.json)
echo "EXTENSION_NAME=${NAME}" >> $GITHUB_ENV

- name: Check current release version
run: |
VERSION=$(git fetch --tags && git tag | xargs -n1 test -z && echo '0.0.0' || git rev-list --tags --topo-order --max-count=1 | xargs git describe --tags)
echo "RELEASE_VERSION=${VERSION}" >> $GITHUB_ENV

- name: Check package.json version
run: |
VERSION=$(jq -r '.version' package.json)
echo "MANIFEST_VERSION=${VERSION}" >> $GITHUB_ENV

- name: Push next release tag
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api \
repos/${{ github.repository}}/git/refs \
--method POST \
--field ref="refs/tags/${{ env.MANIFEST_VERSION}}" \
--field sha="${{ github.sha }}"

- uses: pnpm/action-setup@v4
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}

- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
with:
node-version-file: .node-version
cache: pnpm

- name: Install dependencies
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
run: pnpm install

- name: Build and zip the extension
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
run: pnpm run zip

- name: Create release
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
id: create_release
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.MANIFEST_VERSION }}
release_name: Release ${{ env.MANIFEST_VERSION }}

- name: Upload release asset
if: ${{ success() && env.RELEASE_VERSION != env.MANIFEST_VERSION }}
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ env.OUTDIR }}/${{ env.EXTENSION_NAME }}-${{ env.MANIFEST_VERSION }}-chrome.zip
asset_name: ${{ env.EXTENSION_NAME }}-${{ env.MANIFEST_VERSION }}-chrome.zip
asset_content_type: application/zip
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
# y-blacklist
# y-blacklist ![CI](https://github.com/shuymn/y-blacklist/workflows/CI/badge.svg)

A browser extension that allows you to hide YouTube video comments and replies using regular expression patterns.

# Installation

- Chrome Web Store (coming soon)

## Manual

1. Download the zip file from [Releases](https://github.com/shuymn/y-blacklist/releases)
2. Unzip
3. Turn on **Developer Mode** in extensions management page (`chrome://extensions/`)
4. Put the unziped into **Load unpacked**

# Bug Tracker

Report bug at [Issues](https://github.com/shuymn/y-blacklist/issues)

# License

MIT © shuymn, see [LICENSE](https://github.com/shuymn/y-blacklist/blob/main/LICENSE)
17 changes: 17 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"css": "src/assets/tailwind.css",
"baseColor": "zinc",
"cssVariables": true,
"prefix": ""
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
}
}
22 changes: 14 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "y-blacklist",
"description": "",
"private": true,
"version": "0.0.0",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "wxt",
Expand All @@ -19,22 +19,28 @@
"format:fix": "biome format --fix ./src"
},
"dependencies": {
"@webext-core/messaging": "^2.0.2",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.1",
"@wxt-dev/i18n": "^0.2.2",
"lucide-vue-next": "^0.453.0",
"pinia": "^2.2.4",
"vue": "^3.5.11"
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"lucide-react": "^0.454.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@types/chrome": "^0.0.279",
"@wxt-dev/module-vue": "^1.0.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@wxt-dev/auto-icons": "^1.0.2",
"@wxt-dev/module-react": "^1.1.1",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.13",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.2",
"vue-tsc": "^2.1.6",
"wxt": "^0.19.11"
},
"packageManager": "pnpm@9.12.2"
Expand Down
Loading