diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..aa08ec04 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,41 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - run: npm ci + + - run: npm run lint + + - run: npm test + + - name: Extract changelog for this version + id: changelog + run: | + VERSION="${GITHUB_REF_NAME#v}" + # Extract section between this version header and the next version header + awk "/^## \[${VERSION}\]/{found=1; next} /^## \[/{if(found) exit} found{print}" CHANGELOG.md > /tmp/release-notes.md + cat /tmp/release-notes.md + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + body_path: /tmp/release-notes.md + generate_release_notes: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3962c2d4..b22fd59e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.15.0] - 2026-02-24 + +### Added +- Community language support: communities can now configure their preferred language (#663). +- Release confirmation feature: users must confirm before releasing funds, preventing accidental releases (#723). +- User command logging: all commands sent by users are now logged to a dedicated log file for auditing (#717). +- Unit tests for utility functions, improving test coverage (#700). +- External health monitoring module: push-based heartbeat system for monitoring bot health via an external service (#753). + +### Fixed +- Persian (IRT) translation: corrected currency name from "ریال" to "تومان" (#716). +- Fixed `next_arg` initialization: prevents errors when `match[2]` is undefined in command parsing (#740). + +### Changed +- Updated Mongoose from 7.x to 8.17.1 (#725). + +### Security +- Bumped `js-yaml` from 4.1.0 to 4.1.1 (#709). +- Bumped `@smithy/config-resolver` from 4.0.1 to 4.4.5 (#720). +- Bumped `axios` from 1.12.0 to 1.13.5 (#742). + ## [0.14.3] - 2025-10-27 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e350a385..e459834a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,3 +70,38 @@ https://help.github.com/articles/signing-commits-with-gpg/ for instructions. ### Keep the git history clean It's very important to keep the git history clear, light and easily browsable. This means contributors must make sure their pull requests include only meaningful commits (if they are redundant or were added after a review, they should be removed) and _no merge commits_. + +### Commit message prefixes + +We encourage using conventional prefixes in commit messages: + +- `feat:` — new features (bumps minor version) +- `fix:` — bug fixes (bumps patch version) +- `chore:` — maintenance, dependencies, CI +- `docs:` — documentation only +- `test:` — test additions or fixes +- `refactor:` — code changes that don't add features or fix bugs + +Example: `feat: add community language support (#663)` + +## Quality Gates + +Before submitting a PR, make sure all checks pass: + +```bash +npm run format # Prettier formatting +npm run lint # ESLint checks +npm test # Mocha test suite +``` + +CI will run these automatically on your PR. + +## Release Process + +Releases follow [Semantic Versioning](https://semver.org/): + +1. Maintainer updates `version` in `package.json` +2. Updates `CHANGELOG.md` with the new version section +3. Commits: `chore: bump version to vX.Y.Z` +4. Creates and pushes a git tag: `git tag vX.Y.Z && git push origin vX.Y.Z` +5. GitHub Actions automatically creates the GitHub Release with changelog notes diff --git a/package-lock.json b/package-lock.json index a9d463ca..674a29d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lnp2pbot", - "version": "0.14.3", + "version": "0.15.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lnp2pbot", - "version": "0.14.3", + "version": "0.15.0", "license": "MIT", "dependencies": { "@grammyjs/i18n": "^0.5.1", @@ -51,6 +51,9 @@ "telegram-test-api": "^2.5.0", "typegram": "^5.2.0", "typescript": "5.1.6" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@colors/colors": { diff --git a/package.json b/package.json index bf02aaa1..8c8aac4e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "lnp2pbot", - "version": "0.14.3", + "version": "0.15.0", + "engines": { + "node": ">=18.0.0" + }, "author": "Francisco Calderón ", "description": "P2P lightning network telegram bot", "main": "dist/app.js",