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

Release 1.2.0 #12

Merged
merged 2 commits into from
Aug 6, 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
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: build

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
on: [pull_request]

jobs:
build:
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
env:
DIRECTORY: dist

name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version. Example: 1.0.0'
required: true
type: string
jobs:
Version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 20
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: install
run: npm ci || npm install
- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{ inputs.version }}>',
sha: context.sha
})
- if: ${{ inputs.version }}
name: Create release
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: >
await github.request(`POST /repos/${{ github.repository
}}/releases`, {
tag_name: "v${{ inputs.version }}",
generate_release_notes: true
});
Submit:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
command:
- chrome
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
cache: npm
- name: install
run: npm ci || npm install
- run: npm run prod --if-present
- name: Update extension’s meta
run: >-
npx dot-json@1 $DIRECTORY/manifest.json version ${{ inputs.version }}
- name: Submit
run: |
case ${{ matrix.command }} in
chrome)
cd $DIRECTORY && npx chrome-webstore-upload-cli@2 upload --auto-publish
;;
esac
env:
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
101 changes: 101 additions & 0 deletions README.RU.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<header>

<div style="text-align: center">
<h1>Bitcoin blocks tracker</h1>

<p>Расширение для отслеживания блоков Bitcoin и комиссий с помощью Mempool Space</p>

[README in English](./README)

<a rel="noreferrer noopener" target="_blank" href="https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim">
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/v/jhdbfjhembciojemihcimllmbibiakim?color=red&label=%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%20%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F&logo=google-chrome&logoColor=red&style=for-the-badge">
</a>
<a rel="noreferrer noopener" target="_blank" href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases">
<img alt="Новейший релиз" src="https://img.shields.io/github/v/release/IvanSavoskin/bitcoin-blocks-tracker-extension?label=%D1%81%D0%B2%D0%B5%D0%B6%D0%B8%D0%B9%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7&logo=github&style=for-the-badge">
</a>
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension">
<img src="https://img.shields.io/github/languages/top/IvanSavoskin/bitcoin-blocks-tracker-extension?style=flat-square&logo=github" alt="GitHub основной язык" />
</a>
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/workflows/build/badge.svg">
<img src="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/workflows/build/badge.svg" alt="Сборка" />
</a>
</div>

</header>

## Введение

Это расширение создано для того, чтобы легко и удобно отслеживать появление новых блоков в сети Bitcoin.
После того, как новый блок будет смайнен, расширение оповещает пользователя звуковым сигналом.
Расширение также позволяет быстро отслеживать текущие комиссии в сети.

Получение данных о блоках и комиссиях осуществляется с помощью [mempool.space](https://mempool.space/)

## Функции

- Получение звукового уведомления при появлении нового блока в основной или тестовой сети
сети Bitcoin
- Получение звукового уведомления при пересечении комиссией в сети заданного значения
- Получение информации о текущих комиссиях в сети Bitcoin
- Получение информации о времени появления последнего блока

## Установка

**Нажмите [сюда][1], а затем нажмите "Установить" на открывшейся странице**

> * Разработано и протестировано для **Google Chrome**
> * Может быть установлено в любом браузере Chromium - Opera (GX), Vivaldi и т.д.
> * В Microsoft Edge сначала нажмите «Разрешить расширения из других магазинов» (появится запрос)

### Когда версия для Firefox?

На данный момент **версия для Firefox не планируется**.

1. Firefox не поддерживает некоторые важные функции расширения *(PiP API и background service workers)*.
2. Для частичной поддержки потребуется сильно изменить рабочий процесс.
3. Нет спроса на версию для Firefox.

## Локальная установка

### Предустановки
1. Скачай [свежий релиз][2] либо весь репозиторий
2. Установите Node.js (требуемая версия в [package.json](./package.json))
3. Должен быть установлен совместимый `npm`
4. В терминале выполните команду `npm install` из папки проекта

### Линтеры
Для контроля качества кода предусмотрено подключение линтеров.

#### ESLint
Правила для ESLint указаны в файле `/.eslintrc`.

Проверка кода с использованием ESLint запускается командой `npm run eslint`.

#### Stylelint
Правила для Stylelint указаны в файле `/.stylelintrc.json`.

Проверка стилей с помощью Stylelint запускается командой

### Сборка для разработки
Запустите dev сборку с помощью команды `npm run dev`.

После сборки будет создана папка `/dist` со сборкой расширения,
которую можно использовать для добавления в браузер.

Каждое изменение кода автоматически инициирует пересборку расширения.

Во время сборки также добавляется source map, позволяющие использовать Chrome Dev Tools

### Промышленная сборка
Запустите prod сборку с помощью команды `npm run prod`.

Перед сборкой автоматически запускается проверка кода с помощью ESLint и StyleLint.

Собранный проект сохраняется в папке `/dist`.

### Загрузить расширение в Chrome

Загрузить каталог `dist` на странице расширения Chrome ([инструкция](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked))

[1]: https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim
[2]: https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@

<p>Extension for track Bitcoin blocks and fees via Mempool space</p>

[README на Русском](./README.RU)

<a rel="noreferrer noopener" target="_blank" href="https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim">
<img alt="Chrome Web Store" src="https://img.shields.io/badge/Chrome-141e24.svg?&style=for-the-badge&logo=google-chrome&logoColor=white">
<img alt="Chrome Web Store" src="https://img.shields.io/chrome-web-store/v/jhdbfjhembciojemihcimllmbibiakim?color=red&label=%D0%B0%D0%BA%D1%82%D1%83%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F%20%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F&logo=google-chrome&logoColor=red&style=for-the-badge">
</a>
<a rel="noreferrer noopener" target="_blank" href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases">
<img alt="Newest release" src="https://img.shields.io/github/v/release/IvanSavoskin/bitcoin-blocks-tracker-extension?label=%D1%81%D0%B2%D0%B5%D0%B6%D0%B8%D0%B9%20%D1%80%D0%B5%D0%BB%D0%B8%D0%B7&logo=github&style=for-the-badge">
</a>
<a href="https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension">
<img src="https://img.shields.io/github/languages/top/IvanSavoskin/bitcoin-blocks-tracker-extension?style=flat-square&logo=github" alt="GitHub top language" />
Expand All @@ -30,15 +35,33 @@ Obtaining blocks and fees data is done using [mempool.space](https://mempool.spa

- Receiving sound notification when a new block appears in the mainnet or testnet of the
Bitcoin network
- Receiving a sound notification when the fee in the network crosses a specified value
- Obtaining information about current fees in the Bitcoin network
- Obtaining information about the time the last block appeared

## Installation

**Click [here][1], then click "Add to Chrome"**

> * Developed and tested for **Google Chrome**
> * Can be installed on any Chromium browser - Opera (GX), Vivaldi, etc.
> * In Microsoft Edge, click "Allow extensions from other stores" fisrt (is asked)

### Firefox version when?

There are currently no plans to support Firefox.

1. Firefox does not support some crucial functions *(Background service workers)*.
2. Partial support will require an extensive tooling changes.
3. There is no demand for the Firefox version.

## Local installation

### Prerequisites
1. You need to preinstall `node@^20.x`
2. Compatible `npm` must be installed
3. In the terminal, run the `npm install` command from the project folder
1. Download [latest release][2] or the whole repository
2. Install Node.js (required version in [package.json](./package.json))
3. Compatible `npm` must be installed
4. In the terminal, run the `npm install` command from the project folder

### Linters
To monitor the quality of the code, the project provides for the connection of linters.
Expand All @@ -49,7 +72,7 @@ Rules for ESLint are specified in the `/.eslintrc` file.
Code checking using ESLint starts with the command `npm run eslint`.

#### Stylelint
Rules for Stylelint are specified in the `kalita/.stylelintrc.json` file.
Rules for Stylelint are specified in the `/.stylelintrc.json` file.

Styles checking using Stylelint starts with the command `npm run stylelint`.

Expand All @@ -73,3 +96,6 @@ Built project is stored in the `/dist` folder.
### Load extension to Chrome

Load `dist` directory on Chrome extension page ([instruction](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked))

[1]: https://chromewebstore.google.com/detail/bitcoin-blocks-tracker/jhdbfjhembciojemihcimllmbibiakim
[2]: https://github.com/IvanSavoskin/bitcoin-blocks-tracker-extension/releases
Loading
Loading