Skip to content
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
83 changes: 83 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Bug report
description: Something does not work as expected
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting. Precise reproduction steps make fixes much faster.

**Found a security issue?** Do not describe it here — use the [private form](https://github.com/maximkr/rfid-manager/security/advisories/new), see [SECURITY.md](https://github.com/maximkr/rfid-manager/blob/main/SECURITY.md).

- type: textarea
id: what-happened
attributes:
label: What happens
description: Describe the problem and what you expected instead.
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Open the ... screen
2. Set write power to ... dBm
3. Pull the trigger
4. ...
validations:
required: true

- type: input
id: device
attributes:
label: Device
description: Handheld model and Android version.
placeholder: "Chainway C5, Android 13"
validations:
required: true

- type: input
id: version
attributes:
label: App version
description: From the release page, or `versionName` if you built it yourself.
placeholder: "1.0"
validations:
required: true

- type: dropdown
id: area
attributes:
label: Which part
options:
- Scan & Write (tag programming)
- Radar (tag search)
- Barcode scanner
- Activity log
- Settings
- Reader connection / startup
- Other
validations:
required: true

- type: input
id: tags
attributes:
label: Tags used
description: Tag type and EPC size, if relevant.
placeholder: "EPC Gen2, 6-word EPC"

- type: textarea
id: logs
attributes:
label: Logs
description: Relevant output from the in-app Activity Log, or `adb logcat`.
render: text

- type: textarea
id: extra
attributes:
label: Anything else
description: Screenshots, workarounds, anything that helps.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Report a vulnerability
url: https://github.com/maximkr/rfid-manager/security/advisories/new
about: Private channel. Please do not describe security issues in public issues.
- name: Chainway device SDK
url: https://www.chainway.net/
about: Problems inside the vendor DeviceAPI SDK need to go to Chainway, not here.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature request
description: An idea for a new capability or an improvement
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What problem does this solve
description: Describe the situation that is awkward today — what you are trying to do and why it does not work.
validations:
required: true

- type: textarea
id: solution
attributes:
label: How it could work
description: Your proposal. If it involves the UI, describe it or attach a sketch.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: What you do instead today
description: Workarounds, other apps, manual steps.

- type: input
id: device
attributes:
label: Device
description: Which handheld you use, if the request is hardware-specific.
placeholder: "Chainway C5"

- type: checkboxes
id: contribution
attributes:
label: Contribution
options:
- label: I am willing to implement this myself
31 changes: 31 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: 2

updates:
# AndroidX, Kotlin, AGP и прочее из gradle/libs.versions.toml
- package-ecosystem: gradle
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 5
groups:
androidx:
patterns:
- "androidx.*"
kotlin:
patterns:
- "org.jetbrains.kotlin*"
- "org.jetbrains.kotlinx:*"
minor-and-patch:
update-types:
- minor
- patch

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 5
groups:
actions:
patterns:
- "*"
31 changes: 31 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!-- Thanks for contributing. Fill in what applies, delete the rest. -->

## What changes

<!-- Briefly: what this PR does and why. -->

## Related issues

<!-- e.g. Closes #12 -->

## How to verify

<!-- Steps a reviewer can follow. -->

## Tested on hardware?

<!-- Which device, which Android version — or "not needed, logic only". -->

- [ ] Verified on a physical device
- [ ] Not applicable — change does not touch reader, scanner or radar behaviour

## Screenshots

<!-- For UI changes: before and after. -->

## Checklist

- [ ] `./gradlew testDebugUnitTest assembleDebug` passes locally
- [ ] New logic is covered by unit tests, or there is a reason it cannot be
- [ ] Hardware calls stay behind the adapter interfaces, not inlined into fragments
- [ ] Documentation updated — `README.md`, `AGENTS.md` (or not needed)
107 changes: 107 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Release

# Запускается при пуше тега вида v1.1.0
# git tag v1.1.0 && git push origin v1.1.0
on:
push:
tags:
- 'v*'

permissions:
contents: write # создать GitHub Release

jobs:
release:
name: APK
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'

- name: Set up Android SDK
uses: android-actions/setup-android@v3

- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4

# Релиз не выпускается, если юнит-тесты красные
- name: Unit tests
run: ./gradlew --no-daemon testDebugUnitTest

# Собирается debug-сборка: она подписана отладочным ключом и потому
# устанавливается на устройство сразу. Чтобы выпускать release-сборку,
# нужен keystore — см. комментарий в конце файла.
- name: Build APK
run: ./gradlew --no-daemon assembleDebug

- name: Подготовить артефакт
run: |
mkdir -p dist
cp app/build/outputs/apk/debug/app-debug.apk \
"dist/rfid-manager-${GITHUB_REF_NAME}-debug.apk"

- name: Подготовить описание релиза
run: |
cat > release-notes.md <<'EOF'
## Установка

**Обычный способ — [RuStore](https://www.rustore.ru/catalog/app/com.trackstudio.rfidmanager).**
Оттуда приходит официальная подписанная сборка, она же обновляется штатно.

Приложенный ниже `rfid-manager-TAG_PLACEHOLDER-debug.apk` — сборка для
тестирования и сайдлоада: собрана из исходников этого тега и подписана
отладочным ключом.

```bash
adb install -r rfid-manager-TAG_PLACEHOLDER-debug.apk
```

> ⚠️ Отладочный ключ не совпадает с ключом сборки из RuStore. Поставить
> этот APK поверх версии из магазина не получится — Android откажет
> из-за несовпадения подписи. Сначала удалите установленное приложение.
> Обратная замена тоже потребует удаления.

Требуется Android 13 (API 33) или новее. Разрабатывалось и проверялось
на **Chainway C5**.
EOF
sed -i "s/TAG_PLACEHOLDER/${GITHUB_REF_NAME}/g" release-notes.md

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${GITHUB_REF_NAME}" \
"dist/rfid-manager-${GITHUB_REF_NAME}-debug.apk" \
--title "${GITHUB_REF_NAME}" \
--notes-file release-notes.md \
--generate-notes

# ----------------------------------------------------------------------------
# Как перейти на подписанную release-сборку
#
# 1. Создать keystore:
# keytool -genkey -v -keystore release.jks -keyalg RSA -keysize 2048 \
# -validity 10000 -alias release
# 2. Добавить в Settings -> Secrets and variables -> Actions секреты:
# KEYSTORE_BASE64 — base64 файла release.jks
# KEYSTORE_PASSWORD
# KEY_ALIAS
# KEY_PASSWORD
# 3. Прописать signingConfigs в app/build.gradle.kts, читая их из переменных
# окружения, и заменить выше assembleDebug на assembleRelease, а путь —
# на app/build/outputs/apk/release/app-release.apk
#
# Использовать здесь тот же keystore, которым подписана сборка в RuStore, —
# тогда APK с GitHub будет ставиться поверх магазинной версии без удаления,
# и предупреждение из описания релиза можно будет убрать.
#
# Keystore нужно хранить вне репозитория: потеряв его, вы не сможете выпускать
# обновления, устанавливаемые поверх уже установленной версии.
# ----------------------------------------------------------------------------
75 changes: 75 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the maintainer — [@maximkr](https://github.com/maximkr). All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved for a specified period of time. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
Loading
Loading