mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
Rework Actions
This commit is contained in:
parent
7b6c28bd0c
commit
719d90bfdd
11 changed files with 308 additions and 189 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
@ -8,6 +8,8 @@ env:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
name: Build Equicord
|
name: Build Equicord
|
||||||
|
@ -16,7 +18,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
- uses: pnpm/action-setup@v3
|
||||||
|
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
@ -34,7 +36,7 @@ jobs:
|
||||||
run: pnpm buildStandalone
|
run: pnpm buildStandalone
|
||||||
|
|
||||||
- name: Generate plugin list
|
- name: Generate plugin list
|
||||||
run: pnpm generatePluginJson dist/plugins.json dist/plugin-readmes.json
|
run: pnpm generatePluginJson dist/vencordplugins.json
|
||||||
|
|
||||||
- name: Generate Equicord plugin list
|
- name: Generate Equicord plugin list
|
||||||
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
||||||
|
@ -69,26 +71,15 @@ jobs:
|
||||||
- name: Upload Equicord Stable
|
- name: Upload Equicord Stable
|
||||||
if: ${{ github.ref_name == 'main' }}
|
if: ${{ github.ref_name == 'main' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload latest --clobber dist/release/*
|
gh release upload latest --clobber dist/release/*
|
||||||
|
|
||||||
- name: Upload Equicord Dev
|
- name: Upload Equicord Dev
|
||||||
if: ${{ github.ref_name == 'dev' }}
|
if: ${{ github.ref_name == 'dev' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload devbuild --clobber dist/release/*
|
gh release upload devbuild --clobber dist/release/*
|
||||||
|
|
||||||
- name: Upload Plugins JSON to Equibored repo
|
- name: Upload build artifact
|
||||||
if: ${{ github.ref_name == 'main' }}
|
uses: actions/upload-artifact@v4
|
||||||
run: |
|
with:
|
||||||
git config --global user.name "$USERNAME"
|
name: "build"
|
||||||
git config --global user.email "78185467+thororen1234@users.noreply.github.com"
|
path: "dist/release/*"
|
||||||
git clone https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git upload
|
|
||||||
cd upload
|
|
||||||
rm plugins.json
|
|
||||||
cp -r ../dist/equicordplugins.json plugins.json
|
|
||||||
git add -A
|
|
||||||
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
|
||||||
git push --force https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git
|
|
||||||
env:
|
|
||||||
API_TOKEN: ${{ secrets.ETOKEN }}
|
|
||||||
GH_REPO: Equicord/Equibored
|
|
||||||
USERNAME: thororen1234
|
|
||||||
|
|
34
.github/workflows/codeberg-mirror.yml
vendored
34
.github/workflows/codeberg-mirror.yml
vendored
|
@ -1,22 +1,22 @@
|
||||||
name: Sync to Codeberg
|
name: Sync to Codeberg
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.ref }}
|
group: ${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 */6 * * *"
|
- cron: "0 */6 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
codeberg:
|
codeberg:
|
||||||
name: Sync Codeberg and Github
|
name: Sync Codeberg and Github
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: pixta-dev/repository-mirroring-action@674e65a7d483ca28dafaacba0d07351bdcc8bd75 # v1.1.1
|
- uses: pixta-dev/repository-mirroring-action@674e65a7d483ca28dafaacba0d07351bdcc8bd75 # v1.1.1
|
||||||
with:
|
with:
|
||||||
target_repo_url: "git@codeberg.org:thororen/Equicord.git"
|
target_repo_url: "git@codeberg.org:thororen/Equicord.git"
|
||||||
ssh_private_key: ${{ secrets.CODEBERG }}
|
ssh_private_key: ${{ secrets.CODEBERG }}
|
||||||
|
|
104
.github/workflows/reportBrokenPlugins.yml
vendored
104
.github/workflows/reportBrokenPlugins.yml
vendored
|
@ -1,67 +1,67 @@
|
||||||
name: Test Patches
|
name: Test Patches
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
# Every day at midnight
|
# Every day at midnight
|
||||||
- cron: 0 0 * * *
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
TestPlugins:
|
TestPlugins:
|
||||||
name: Test Patches
|
name: Test Patches
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
with:
|
with:
|
||||||
ref: dev
|
ref: dev
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
||||||
|
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Install Google Chrome
|
- name: Install Google Chrome
|
||||||
id: setup-chrome
|
id: setup-chrome
|
||||||
uses: browser-actions/setup-chrome@82b9ce628cc5595478a9ebadc480958a36457dc2
|
uses: browser-actions/setup-chrome@82b9ce628cc5595478a9ebadc480958a36457dc2
|
||||||
with:
|
with:
|
||||||
chrome-version: stable
|
chrome-version: stable
|
||||||
|
|
||||||
- name: Build Equicord Reporter Version
|
- name: Build Equicord Reporter Version
|
||||||
run: pnpm buildReporter
|
run: pnpm buildReporter
|
||||||
|
|
||||||
- name: Create Report
|
- name: Create Report
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
export PATH="$PWD/node_modules/.bin:$PATH"
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
||||||
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
||||||
|
|
||||||
esbuild scripts/generateReport.ts > dist/report.mjs
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
||||||
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
||||||
env:
|
env:
|
||||||
DISCORD_TOKEN: ${{ secrets.DTOKEN }}
|
DISCORD_TOKEN: ${{ secrets.DTOKEN }}
|
||||||
DISCORD_WEBHOOK: ${{ secrets.WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.WEBHOOK }}
|
||||||
|
|
||||||
- name: Create Report (Canary)
|
- name: Create Report (Canary)
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
if: success() || failure() # even run if previous one failed
|
if: success() || failure() # even run if previous one failed
|
||||||
run: |
|
run: |
|
||||||
export PATH="$PWD/node_modules/.bin:$PATH"
|
export PATH="$PWD/node_modules/.bin:$PATH"
|
||||||
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
|
||||||
export USE_CANARY=true
|
export USE_CANARY=true
|
||||||
|
|
||||||
esbuild scripts/generateReport.ts > dist/report.mjs
|
esbuild scripts/generateReport.ts > dist/report.mjs
|
||||||
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
node dist/report.mjs >> $GITHUB_STEP_SUMMARY
|
||||||
env:
|
env:
|
||||||
DISCORD_TOKEN: ${{ secrets.DTOKEN }}
|
DISCORD_TOKEN: ${{ secrets.DTOKEN }}
|
||||||
DISCORD_WEBHOOK: ${{ secrets.WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.WEBHOOK }}
|
||||||
|
|
36
.github/workflows/syncDev.yml
vendored
36
.github/workflows/syncDev.yml
vendored
|
@ -1,25 +1,25 @@
|
||||||
name: Sync Vencord Dev
|
name: Sync Vencord Dev
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WORKFLOW_TOKEN: ${{ secrets.ETOKEN }}
|
WORKFLOW_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
UPSTREAM_URL: "https://github.com/Vendicated/Vencord.git"
|
UPSTREAM_URL: "https://github.com/Vendicated/Vencord.git"
|
||||||
UPSTREAM_BRANCH: "dev"
|
UPSTREAM_BRANCH: "dev"
|
||||||
DOWNSTREAM_BRANCH: "dev"
|
DOWNSTREAM_BRANCH: "dev"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 * * * *"
|
- cron: "0 * * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Sync Vencord Dev
|
- name: Sync Vencord Dev
|
||||||
id: sync
|
id: sync
|
||||||
uses: verticalsync/sync-upstream-repo@master
|
uses: verticalsync/sync-upstream-repo@master
|
||||||
with:
|
with:
|
||||||
upstream_repo: ${{ env.UPSTREAM_URL }}
|
upstream_repo: ${{ env.UPSTREAM_URL }}
|
||||||
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
||||||
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
|
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
|
||||||
token: ${{ env.WORKFLOW_TOKEN }}
|
token: ${{ env.WORKFLOW_TOKEN }}
|
||||||
|
|
36
.github/workflows/syncMain.yml
vendored
36
.github/workflows/syncMain.yml
vendored
|
@ -1,25 +1,25 @@
|
||||||
name: Sync Vencord Main
|
name: Sync Vencord Main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
WORKFLOW_TOKEN: ${{ secrets.ETOKEN }}
|
WORKFLOW_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
UPSTREAM_URL: "https://github.com/Vendicated/Vencord.git"
|
UPSTREAM_URL: "https://github.com/Vendicated/Vencord.git"
|
||||||
UPSTREAM_BRANCH: "main"
|
UPSTREAM_BRANCH: "main"
|
||||||
DOWNSTREAM_BRANCH: "main"
|
DOWNSTREAM_BRANCH: "main"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 * * * *"
|
- cron: "0 * * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Sync Vencord Main
|
- name: Sync Vencord Main
|
||||||
id: sync
|
id: sync
|
||||||
uses: verticalsync/sync-upstream-repo@master
|
uses: verticalsync/sync-upstream-repo@master
|
||||||
with:
|
with:
|
||||||
upstream_repo: ${{ env.UPSTREAM_URL }}
|
upstream_repo: ${{ env.UPSTREAM_URL }}
|
||||||
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
upstream_branch: ${{ env.UPSTREAM_BRANCH }}
|
||||||
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
|
downstream_branch: ${{ env.DOWNSTREAM_BRANCH }}
|
||||||
token: ${{ env.WORKFLOW_TOKEN }}
|
token: ${{ env.WORKFLOW_TOKEN }}
|
||||||
|
|
96
.github/workflows/test.yml
vendored
96
.github/workflows/test.yml
vendored
|
@ -1,65 +1,65 @@
|
||||||
name: Test
|
name: Test
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: Test For Pushes
|
name: Test For Pushes
|
||||||
if: ${{ github.event_name == 'push' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
||||||
|
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Lint & Test if desktop version compiles
|
- name: Lint & Test if desktop version compiles
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
- name: Test if web version compiles
|
- name: Test if web version compiles
|
||||||
run: pnpm buildWeb
|
run: pnpm buildWeb
|
||||||
|
|
||||||
- name: Test if plugin structure is valid
|
- name: Test if plugin structure is valid
|
||||||
run: pnpm generatePluginJson
|
run: pnpm generatePluginJson
|
||||||
|
|
||||||
TestForPRs:
|
TestForPRs:
|
||||||
name: Test For Pull Requests
|
name: Test For Pull Requests
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
||||||
|
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Lint & Test if desktop version compiles
|
- name: Lint & Test if desktop version compiles
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
- name: Test if web version compiles
|
- name: Test if web version compiles
|
||||||
run: pnpm buildWeb
|
run: pnpm buildWeb
|
||||||
|
|
||||||
- name: Test if plugin structure is valid
|
- name: Test if plugin structure is valid
|
||||||
run: pnpm generatePluginJson
|
run: pnpm generatePluginJson
|
||||||
|
|
94
.github/workflows/uploadBuilds.yml
vendored
Normal file
94
.github/workflows/uploadBuilds.yml
vendored
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
name: Upload Builds
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [Release]
|
||||||
|
types: [completed]
|
||||||
|
branches: [main, dev]
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
REPO: Equicord/Builds
|
||||||
|
TOKEN: ${{ secrets.ETOKEN }}
|
||||||
|
USERNAME: GitHub-Actions
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Date:
|
||||||
|
name: Date
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
outputs:
|
||||||
|
DATE: ${{ steps.combined.outputs.DATE }}
|
||||||
|
TIME: ${{ steps.combined.outputs.TIME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get Month Day Year
|
||||||
|
id: date
|
||||||
|
uses: Kaven-Universe/github-action-current-date-time@v1
|
||||||
|
with:
|
||||||
|
timezone-offset: 240
|
||||||
|
|
||||||
|
- name: Combine Time
|
||||||
|
id: combined
|
||||||
|
run: |
|
||||||
|
echo "DATE=$YEAR/$MONTH/$DAY" >> $GITHUB_OUTPUT
|
||||||
|
echo "TIME=$HOURS-$MINUTES-$SECONDS" >> $GITHUB_OUTPUT
|
||||||
|
env:
|
||||||
|
YEAR: ${{ steps.date.outputs.year }}
|
||||||
|
MONTH: ${{ steps.date.outputs.month }}
|
||||||
|
DAY: ${{ steps.date.outputs.day }}
|
||||||
|
HOURS: ${{ steps.date.outputs.hours }}
|
||||||
|
MINUTES: ${{ steps.date.outputs.minutes }}
|
||||||
|
SECONDS: ${{ steps.date.outputs.seconds }}
|
||||||
|
|
||||||
|
Upload:
|
||||||
|
name: Upload Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: Date
|
||||||
|
env:
|
||||||
|
DATE: ${{ needs.Date.outputs.DATE }}
|
||||||
|
TIME: ${{ needs.Date.outputs.TIME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Actions User
|
||||||
|
run: |
|
||||||
|
git config --global user.name "GitHub-Actions"
|
||||||
|
git config --global user.email actions@github.com
|
||||||
|
|
||||||
|
- name: Download build artifact from triggered workflow
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
name: build
|
||||||
|
path: ./release
|
||||||
|
search_artifacts: true
|
||||||
|
|
||||||
|
- name: Upload Stable Build to Builds repo
|
||||||
|
if: ${{ github.event.workflow_run.head_branch == 'main' }}
|
||||||
|
run: |
|
||||||
|
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
||||||
|
cd builds
|
||||||
|
|
||||||
|
mkdir -p stable/$DATE/$TIME
|
||||||
|
cp -r ../release/* ./stable/$DATE/$TIME
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git commit -m "Stable Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
|
git push --force https://$USERNAME:$TOKEN@github.com/$REPO.git
|
||||||
|
|
||||||
|
- name: Upload Dev Build To Builds Repo
|
||||||
|
if: ${{ github.event.workflow_run.head_branch == 'dev' }}
|
||||||
|
run: |
|
||||||
|
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
||||||
|
cd builds
|
||||||
|
|
||||||
|
mkdir -p devbuilds/$DATE/$TIME
|
||||||
|
cp -r ../release/* ./devbuilds/$DATE/$TIME
|
||||||
|
|
||||||
|
git add -A
|
||||||
|
git commit -m "Dev Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
|
git push --force https://$USERNAME:$TOKEN@github.com/$REPO.git
|
46
.github/workflows/uploadPlugins.yml
vendored
Normal file
46
.github/workflows/uploadPlugins.yml
vendored
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: Upload Plugins JSONs
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [Release]
|
||||||
|
types: [completed]
|
||||||
|
branches: [main]
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
REPO: Equicord/Equibored
|
||||||
|
TOKEN: ${{ secrets.ETOKEN }}
|
||||||
|
USERNAME: GitHub-Actions
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Upload:
|
||||||
|
name: Upload Plugins
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Actions User
|
||||||
|
run: |
|
||||||
|
git config --global user.name "GitHub-Actions"
|
||||||
|
git config --global user.email actions@github.com
|
||||||
|
|
||||||
|
- name: Download build artifact from triggered workflow
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
name: build
|
||||||
|
path: ./release
|
||||||
|
search_artifacts: true
|
||||||
|
|
||||||
|
- name: Upload Plugins JSON to Equibored repo
|
||||||
|
run: |
|
||||||
|
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git plugins
|
||||||
|
cd plugins
|
||||||
|
|
||||||
|
cp ../release/*plugins.json .
|
||||||
|
git add -A
|
||||||
|
|
||||||
|
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
|
git push --force https://$USERNAME:$TOKEN@github.com/$REPO.git
|
|
@ -225,11 +225,7 @@ async function parseFile(fileName: string) {
|
||||||
.replace(/\/index\.([jt]sx?)$/, "")
|
.replace(/\/index\.([jt]sx?)$/, "")
|
||||||
.replace(/^src\/plugins\//, "");
|
.replace(/^src\/plugins\//, "");
|
||||||
|
|
||||||
let readme = "";
|
return [data] as const;
|
||||||
try {
|
|
||||||
readme = readFileSync(join(fileName, "..", "README.md"), "utf-8");
|
|
||||||
} catch { }
|
|
||||||
return [data, readme] as const;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw fail("no default export called 'definePlugin' found");
|
throw fail("no default export called 'definePlugin' found");
|
||||||
|
@ -260,23 +256,20 @@ function isPluginFile({ name }: { name: string; }) {
|
||||||
parseEquicordDevs();
|
parseEquicordDevs();
|
||||||
|
|
||||||
const plugins = [] as PluginData[];
|
const plugins = [] as PluginData[];
|
||||||
const readmes = {} as Record<string, string>;
|
|
||||||
|
|
||||||
await Promise.all(["src/plugins", "src/plugins/_core", "src/equicordplugins"].flatMap(dir =>
|
await Promise.all(["src/plugins", "src/plugins/_core", "src/equicordplugins"].flatMap(dir =>
|
||||||
readdirSync(dir, { withFileTypes: true })
|
readdirSync(dir, { withFileTypes: true })
|
||||||
.filter(isPluginFile)
|
.filter(isPluginFile)
|
||||||
.map(async dirent => {
|
.map(async dirent => {
|
||||||
const [data, readme] = await parseFile(await getEntryPoint(dir, dirent));
|
const [data] = await parseFile(await getEntryPoint(dir, dirent));
|
||||||
plugins.sort().push(data);
|
plugins.sort().push(data);
|
||||||
if (readme) readmes[data.name] = readme;
|
|
||||||
})
|
})
|
||||||
));
|
));
|
||||||
|
|
||||||
const data = JSON.stringify(plugins);
|
const data = JSON.stringify(plugins);
|
||||||
|
|
||||||
if (process.argv.length > 3) {
|
if (process.argv.length > 2) {
|
||||||
writeFileSync(process.argv[2], data);
|
writeFileSync(process.argv[2], data);
|
||||||
writeFileSync(process.argv[3], JSON.stringify(readmes));
|
|
||||||
} else {
|
} else {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ function ContributorModal({ user }: { user: User; }) {
|
||||||
</Forms.FormText>
|
</Forms.FormText>
|
||||||
) : (
|
) : (
|
||||||
<Forms.FormText>
|
<Forms.FormText>
|
||||||
{user.username} has not made any plugins. They likely {ContributedHyperLink} to Vencord in other ways!
|
{user.username} has not made any plugins. They likely {ContributedHyperLink} in other ways!
|
||||||
</Forms.FormText>
|
</Forms.FormText>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
User Messages Pronouns
|
|
||||||
|
|
||||||
Adds pronouns to chat user messages
|
|
||||||
|
|
||||||

|
|
Loading…
Add table
Reference in a new issue