Skip to content

Commit

Permalink
update: 4.0.0 alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Googlefan256 committed Nov 30, 2023
1 parent 99f79c5 commit 038fed3
Show file tree
Hide file tree
Showing 47 changed files with 1,882 additions and 1,564 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Publish Docker

on:
workflow_dispatch:

jobs:
build_and_push:
runs-on: ubuntu-latest
env:
IMAGE_NAME: yt-bot
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"useTabs": false
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:slim AS build
WORKDIR /app
COPY package.json ./
RUN npm install -g pnpm && pnpm install
COPY . .
RUN pnpm run build
FROM node:slim
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/package.json ./package.json
RUN npm install --omit=dev
CMD ["node", "dist/index.js"]
94 changes: 47 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"name": "yt-bot",
"version": "3.0.0-alpha.0.0.3",
"description": "Youtube bot for discord",
"type": "commonjs",
"scripts": {
"start": "node dist/index.js",
"build": "ncc build src/index.ts -o dist && terser dist/index.js -o dist/index.js && terser dist/502.index.js -o dist/502.index.js",
"format": "prettier --write \"src/**/*.ts\"",
"dev": "NODE_ENV=development ts-node src/index.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/googlefan256/yt-bot.git"
},
"author": "Googlefan256 (https://googlefan.net/)",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/googlefan256/yt-bot/issues"
},
"homepage": "https://github.com/googlefan256/yt-bot#readme",
"dependencies": {
"@discordjs/opus": "^0.9.0",
"@discordjs/voice": "^0.14.0",
"chalk": "4.1.2",
"discord.js": "^14.6.0",
"dotenv": "^16.0.3",
"ffmpeg-static": "^5.1.0",
"opusscript": "^0.0.8",
"tweetnacl": "^1.0.3",
"yt-search": "^2.10.3",
"ytdl-core": "^4.11.2"
},
"devDependencies": {
"@types/yt-search": "^2.3.2",
"@vercel/ncc": "^0.36.0",
"prettier": "^2.7.1",
"terser": "^5.16.1",
"typescript": "^4.8.4"
},
"engines": {
"node": ">=16.0.0"
},
"licenses": [
{
"type": "Apache-2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0"
"name": "yt-bot",
"version": "4.0.0-alpha-1",
"description": "Youtube bot for discord",
"type": "commonjs",
"scripts": {
"start": "node dist/index.js",
"build": "rimraf dist && tsc",
"format": "prettier --write \"src/**/*.ts\"",
"dev": "cross-env NODE_ENV=development ts-node src/index.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/googlefan256/yt-bot.git"
},
"author": "Googlefan256 (https://googlefan.net/)",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/googlefan256/yt-bot/issues"
},
"homepage": "https://github.com/googlefan256/yt-bot#readme",
"devDependencies": {
"@types/yt-search": "^2.10.3",
"cross-env": "^7.0.3",
"prettier": "^3.1.0",
"rimraf": "^5.0.5",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
},
"engines": {
"node": ">=16.0.0"
},
"licenses": [
{
"type": "Apache-2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0"
}
],
"dependencies": {
"@discordjs/voice": "^0.16.1",
"chalk": "^4.1.2",
"discord.js": "^14.14.1",
"dotenv": "^16.3.1",
"ffmpeg-static": "^5.2.0",
"opusscript": "^0.0.8",
"tweetnacl": "^1.0.3",
"yt-search": "^2.10.4",
"ytdl-core": "^4.11.5"
}
]
}
Loading

0 comments on commit 038fed3

Please sign in to comment.