generated from ptkdev-boilerplate/node-telegram-bot-boilerplate
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,775 additions
and
1,572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Release Beta | ||
on: | ||
push: | ||
branches: | ||
- beta | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GIT_TOKEN }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)' | ||
- run: git config --global user.email 'support@ptkdev.io' | ||
- run: npm ci | ||
- run: npm run github-workflow-next-version -- --cmd beta | ||
- run: npm run pre-commit | ||
- id: pkgjson | ||
run: chmod +x ./scripts/version.sh && ./scripts/version.sh | ||
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push | ||
- run: npm publish --tag beta | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- run: git fetch --all && git checkout nightly | ||
- run: npm run github-workflow-next-version -- --cmd nightly-next | ||
- run: npm run pre-commit | ||
- id: nextnightly | ||
run: chmod +x ./scripts/version.sh && ./scripts/version.sh | ||
- run: git add . && git commit -m "[🚀 Release] v${{ steps.nextnightly.outputs.pkgversion }}" && git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Release Stable | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GIT_TOKEN }} | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)' | ||
- run: git config --global user.email 'support@ptkdev.io' | ||
- run: npm ci | ||
- run: npm run github-workflow-next-version -- --cmd main | ||
- run: npm run pre-commit | ||
- id: pkgjson | ||
run: chmod +x ./scripts/version.sh && ./scripts/version.sh | ||
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push | ||
- run: npm publish --tag latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
- name: Get current date | ||
id: date | ||
run: echo "::set-output name=date::$(date +'%B %d, %Y')" | ||
- run: npm run github-workflow-changelog | ||
- id: changelog | ||
run: chmod +x ./scripts/changelog_release.sh && ./scripts/changelog_release.sh | ||
- name: Release snapshot | ||
id: release-snapshot | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.pkgjson.outputs.pkgversion }} | ||
release_name: v${{ steps.pkgjson.outputs.pkgversion }} | ||
body: | | ||
### CHANGELOG: v${{ steps.pkgjson.outputs.pkgversion }} (${{ steps.date.outputs.date }})${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release Nightly | ||
on: | ||
schedule: | ||
- cron: "30 23 * * *" | ||
push: | ||
branches: | ||
- nightly | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: "!startsWith(github.event.head_commit.message, '[🚀 Release]') || startsWith(github.event.head_commit.message, '[🚀 Release] Nightly')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.GIT_TOKEN }} | ||
ref: nightly | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "16.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: git config --global user.name 'Patryk Rzucidlo (@PTKDev)' | ||
- run: git config --global user.email 'support@ptkdev.io' | ||
- run: npm ci | ||
- run: npm run github-workflow-next-version -- --cmd nightly | ||
- id: pkgjson | ||
run: chmod +x ./scripts/version.sh && ./scripts/version.sh | ||
- run: npm run pre-commit | ||
- run: git add . && git commit -m "[🚀 Release] v${{ steps.pkgjson.outputs.pkgversion }}" && git push | ||
- run: npm publish --tag nightly | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module.exports = { | ||
telegram: { | ||
// from @botfather on telegram | ||
token: process.env.BOT_TOKEN || "1234:asdfghjkl", | ||
}, | ||
|
||
mode: "poll", // or webhook | ||
webhook: { | ||
url: process.env.BOT_WEBHOOK_URL || "https://sample.host.com:8443", | ||
port: process.env.BOT_WEBHOOK_PORT || 8443, | ||
certs_path: process.env.BOT_WEBHOOK_CERTS_PATH || "certs", | ||
self_signed: process.env.BOT_WEBHOOK_SELF_SIGNED || true, | ||
}, | ||
|
||
// mongodb | ||
database: { URL: process.env.MONGODB || "mongodb://localhost:27017/aboutmeinfodb" }, | ||
|
||
// Debug | ||
debug: process.env.DEBUG || true, | ||
|
||
// LOGS | ||
logger: { | ||
path: { | ||
debug_log: "./logs/debug.log", | ||
error_log: "./logs/errors.log", | ||
}, | ||
language: "en", // set language of log type, NOTE: please help with translations! (optional, default en - values: en|it|pl) | ||
colors: true, // enable/disable colors in terminal (optional, default enabled - values: true|enabled or false|disabled) | ||
debug: process.env.DEBUG || true, // enable/disable all logs with method debug (optional, default enabled - values: true|enabled or false|disabled) | ||
info: true, // enable/disable all logs with method info (optional, default enabled - values: true|enabled or false|disabled) | ||
warning: true, // enable/disable all logs with method warning (optional, default enabled - values: true|enabled or false|disabled) | ||
error: true, // enable/disable all logs with method errors (optional, default enabled - values: true|enabled or false|disabled) | ||
sponsor: true, // enable/disable all logs with method sponsor (optional, default enabled - values: true|enabled or false|disabled) | ||
write: false, // write the logs into a file, you need set path values (optional, default disabled - values: true|enabled or false|disabled) | ||
type: "log", // format of logs in files (optional, default log - values: log|json) | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.