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
137 changes: 64 additions & 73 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,82 +3,73 @@
name: Node.js CI

on:
push:
paths-ignore:
- 'README.md'
- '.github/**'
- '.dockerignore'
- 'docker-compose.yml'
- 'Dockerfile'
branches:
- main
pull_request:
paths-ignore:
- 'README.md'
- '.github/**'
- '.dockerignore'
- 'docker-compose.yml'
- 'Dockerfile'
branches:
- main
schedule:
# execute once every monday
- cron: "0 0 * * MON"
push:
paths-ignore:
- "README.md"
- ".github/**"
- ".dockerignore"
- "docker-compose.yml"
- "Dockerfile"
branches:
- dev
schedule:
# execute once every monday
- cron: "0 0 * * 1"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node v16
uses: actions/setup-node@v2
with:
node-version: 16

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Install Node v22
uses: actions/setup-node@v4
with:
node-version: 22

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 10
run_install: false

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Install dependencies
run: pnpm install
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["javascript"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ["javascript"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
38 changes: 0 additions & 38 deletions .github/workflows/pre-release.yml

This file was deleted.

27 changes: 9 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,27 @@ jobs:
name: Public Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

# Set Variables
- name: Set variables
id: vars
run: echo ::set-output name=version::${GITHUB_REF#refs/tags/v}

# Zip up necessary files
- name: Archive Source code
run: zip -r BryanBot-v${{ steps.vars.outputs.version }}.zip * -x Dockerfile docker-compose.yml Dockerignore
run: zip -r BryanBot-v${{ steps.vars.outputs.version }}.zip * -x Dockerfile docker-compose.yml

# Fetch the pterodactyl egg
- name: Receive Pterodactyl Egg
run: wget -O pterodactyl-egg.json https://cdn.zorino.in/egg-bryanbot-bot.json

# Generate checksums for all files and log them to the appropriate file
- name: Generate Checksums
run: |
md5sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json Dockerfile docker-compose.yml .dockerignore > md5-checksums.txt
sha256sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json Dockerfile docker-compose.yml .dockerignore > sha256-checksums.txt
sha512sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json Dockerfile docker-compose.yml .dockerignore > sha512-checksums.txt
# Release Public Build
- uses: "marvinpinto/action-automatic-releases@latest"
md5sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json > md5-checksums.txt
sha256sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json > sha256-checksums.txt
sha512sum BryanBot-v${{ steps.vars.outputs.version }}.zip pterodactyl-egg.json > sha512-checksums.txt

- uses: "softprops/action-gh-release@v2"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
name: "BryanBot v${{ steps.vars.outputs.version }}"
prerelease: false
title: "BryanBot v${{ steps.vars.outputs.version }}"
draft: true
files: |
BryanBot-*.zip
pterodactyl-egg.json
Dockerfile
docker-compose.yml
*-checksums.txt
45 changes: 0 additions & 45 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"better-sqlite3": "^11.8.1",
"chalk": "^5.4.1",
"console-stamp": "^3.1.2",
"discord.js": "^14.17.3",
"discord.js": "^14.18.0",
"fast-folder-size": "^2.4.0",
"ms": "^2.1.3",
"yaml": "^2.7.0"
Expand Down
Loading
Loading