mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
Rework More
This commit is contained in:
parent
aca7001f2c
commit
4ae1d01dd3
5 changed files with 185 additions and 55 deletions
53
.github/workflows/build.yml
vendored
53
.github/workflows/build.yml
vendored
|
@ -1,9 +1,8 @@
|
||||||
name: Release
|
name: Release Stable
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
|
@ -11,9 +10,40 @@ env:
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Date:
|
||||||
name: Build Equicord
|
name: Date
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
Build:
|
||||||
|
name: Build Equicord Stable
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: Date
|
||||||
|
env:
|
||||||
|
DATE: ${{ needs.Date.outputs.DATE }}
|
||||||
|
TIME: ${{ needs.Date.outputs.TIME }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -36,7 +66,7 @@ jobs:
|
||||||
run: pnpm buildStandalone
|
run: pnpm buildStandalone
|
||||||
|
|
||||||
- name: Generate plugin list
|
- name: Generate plugin list
|
||||||
run: pnpm generatePluginJson dist/vencordplugins.json
|
run: pnpm generatePluginJson dist/allplugins.json
|
||||||
|
|
||||||
- name: Generate Equicord plugin list
|
- name: Generate Equicord plugin list
|
||||||
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
||||||
|
@ -69,17 +99,18 @@ jobs:
|
||||||
rm release/*.map
|
rm release/*.map
|
||||||
|
|
||||||
- name: Upload Equicord Stable
|
- name: Upload Equicord Stable
|
||||||
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: Move Files To Date Time dir
|
||||||
if: ${{ github.ref_name == 'dev' }}
|
|
||||||
run: |
|
run: |
|
||||||
gh release upload devbuild --clobber dist/release/*
|
mkdir -p $DATE/$TIME
|
||||||
|
mv /dist/release/* $DATE/$TIME
|
||||||
|
cd $DATE/$TIME
|
||||||
|
echo '$DATE/$TIME' >> time.txt
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: "build"
|
name: "buildStable"
|
||||||
path: "dist/release/*"
|
path: "$DATE/$TIME/*"
|
||||||
|
|
113
.github/workflows/buildDev.yml
vendored
Normal file
113
.github/workflows/buildDev.yml
vendored
Normal file
|
@ -0,0 +1,113 @@
|
||||||
|
name: Release Dev
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
env:
|
||||||
|
FORCE_COLOR: true
|
||||||
|
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Date:
|
||||||
|
name: Date
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
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 }}
|
||||||
|
|
||||||
|
Build:
|
||||||
|
name: Build Equicord Dev
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: Date
|
||||||
|
env:
|
||||||
|
DATE: ${{ needs.Date.outputs.DATE }}
|
||||||
|
TIME: ${{ needs.Date.outputs.TIME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
|
||||||
|
- name: Use Node.js 20
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "pnpm"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Build web
|
||||||
|
run: pnpm buildWeb
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Generate plugin list
|
||||||
|
run: pnpm generatePluginJson dist/allplugins.json
|
||||||
|
|
||||||
|
- name: Collect files to be released
|
||||||
|
run: |
|
||||||
|
cd dist
|
||||||
|
mkdir release
|
||||||
|
|
||||||
|
cp browser/browser.* release
|
||||||
|
cp Vencord.user.{js,js.LEGAL.txt} release
|
||||||
|
|
||||||
|
# copy the plugin data jsons, the extension zips and the desktop/vesktop asars
|
||||||
|
cp *.{json,zip,asar} release
|
||||||
|
|
||||||
|
# legacy un-asared files
|
||||||
|
# FIXME: remove at some point
|
||||||
|
cp desktop/* release
|
||||||
|
for file in vesktop/*; do
|
||||||
|
filename=$(basename "$file")
|
||||||
|
cp "$file" "release/vencordDesktop${filename^}"
|
||||||
|
done
|
||||||
|
for file in equibop/*; do
|
||||||
|
filename=$(basename "$file")
|
||||||
|
cp "$file" "release/equicordDesktop${filename^}"
|
||||||
|
done
|
||||||
|
|
||||||
|
find release -size 0 -delete
|
||||||
|
rm release/package.json
|
||||||
|
rm release/*.map
|
||||||
|
|
||||||
|
- name: Upload Equicord Dev
|
||||||
|
run: |
|
||||||
|
gh release upload devbuild --clobber dist/release/*
|
||||||
|
|
||||||
|
- name: Move Files To Date Time dir
|
||||||
|
run: |
|
||||||
|
mkdir -p $DATE/$TIME
|
||||||
|
mv /dist/release/* $DATE/$TIME
|
||||||
|
cd $DATE/$TIME
|
||||||
|
echo '$DATE/$TIME' >> time.txt
|
||||||
|
|
||||||
|
- name: Upload build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: "buildDev"
|
||||||
|
path: "$DATE/$TIME/*"
|
3
.github/workflows/reportBrokenPlugins.yml
vendored
3
.github/workflows/reportBrokenPlugins.yml
vendored
|
@ -2,7 +2,6 @@ name: Test Patches
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
# Every day at midnight
|
|
||||||
- cron: 0 0 * * *
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -19,7 +18,7 @@ jobs:
|
||||||
- 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
|
||||||
|
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
64
.github/workflows/uploadBuilds.yml
vendored
64
.github/workflows/uploadBuilds.yml
vendored
|
@ -1,9 +1,11 @@
|
||||||
name: Upload Builds
|
name: Upload Builds
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: [Release]
|
workflows: [Release Stable, Release Dev]
|
||||||
types: [completed]
|
types: [completed]
|
||||||
branches: [main, dev]
|
schedule:
|
||||||
|
- cron: 0 0 * * *
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
REPO: Equicord/Builds
|
REPO: Equicord/Builds
|
||||||
|
@ -15,41 +17,9 @@ concurrency:
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
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:
|
Upload:
|
||||||
name: Upload Build
|
name: Upload Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Date
|
|
||||||
env:
|
|
||||||
DATE: ${{ needs.Date.outputs.DATE }}
|
|
||||||
TIME: ${{ needs.Date.outputs.TIME }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -60,21 +30,37 @@ jobs:
|
||||||
git config --global user.email actions@github.com
|
git config --global user.email actions@github.com
|
||||||
|
|
||||||
- name: Download build artifact from triggered workflow
|
- name: Download build artifact from triggered workflow
|
||||||
|
if: ${{ github.event.workflow_run.head_branch == 'main' }}
|
||||||
uses: dawidd6/action-download-artifact@v2
|
uses: dawidd6/action-download-artifact@v2
|
||||||
with:
|
with:
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
name: build
|
name: buildStable
|
||||||
path: ./release
|
path: ./release
|
||||||
search_artifacts: true
|
search_artifacts: true
|
||||||
|
|
||||||
|
- name: Download build artifact from triggered workflow
|
||||||
|
if: ${{ github.event.workflow_run.head_branch == 'dev' }}
|
||||||
|
uses: dawidd6/action-download-artifact@v2
|
||||||
|
with:
|
||||||
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
name: buildDev
|
||||||
|
path: ./${{ github.event.workflow_run.event }}
|
||||||
|
search_artifacts: true
|
||||||
|
|
||||||
|
- name: Get time
|
||||||
|
id: time
|
||||||
|
run: |
|
||||||
|
cd release
|
||||||
|
echo "TIME=$(cat time.txt)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload Stable Build to Builds repo
|
- name: Upload Stable Build to Builds repo
|
||||||
if: ${{ github.event.workflow_run.head_branch == 'main' }}
|
if: ${{ github.event.workflow_run.head_branch == 'main' }}
|
||||||
run: |
|
run: |
|
||||||
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
||||||
cd builds
|
cd builds
|
||||||
|
|
||||||
mkdir -p stable/$DATE/$TIME
|
mkdir -p stable/$TIME
|
||||||
cp -r ../release/* ./stable/$DATE/$TIME
|
cp -r ../release/* ./stable/$TIME
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Stable Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
git commit -m "Stable Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
|
@ -86,8 +72,8 @@ jobs:
|
||||||
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
|
||||||
cd builds
|
cd builds
|
||||||
|
|
||||||
mkdir -p devbuilds/$DATE/$TIME
|
mkdir -p devbuilds/$TIME
|
||||||
cp -r ../release/* ./devbuilds/$DATE/$TIME
|
cp -r ../release/* ./devbuilds/$TIME
|
||||||
|
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Dev Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
git commit -m "Dev Build for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
|
|
7
.github/workflows/uploadPlugins.yml
vendored
7
.github/workflows/uploadPlugins.yml
vendored
|
@ -1,9 +1,11 @@
|
||||||
name: Upload Plugins JSONs
|
name: Upload Plugins JSONs
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: [Release]
|
workflows: [Release Stable]
|
||||||
types: [completed]
|
types: [completed]
|
||||||
branches: [main]
|
schedule:
|
||||||
|
- cron: 0 0 * * *
|
||||||
env:
|
env:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
REPO: Equicord/Equibored
|
REPO: Equicord/Equibored
|
||||||
|
@ -16,7 +18,6 @@ jobs:
|
||||||
Upload:
|
Upload:
|
||||||
name: Upload Plugins
|
name: Upload Plugins
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
Loading…
Add table
Reference in a new issue