mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05: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:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
env:
|
||||
FORCE_COLOR: true
|
||||
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||
|
@ -11,9 +10,40 @@ env:
|
|||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: Build Equicord
|
||||
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 Stable
|
||||
runs-on: ubuntu-latest
|
||||
needs: Date
|
||||
env:
|
||||
DATE: ${{ needs.Date.outputs.DATE }}
|
||||
TIME: ${{ needs.Date.outputs.TIME }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -36,7 +66,7 @@ jobs:
|
|||
run: pnpm buildStandalone
|
||||
|
||||
- name: Generate plugin list
|
||||
run: pnpm generatePluginJson dist/vencordplugins.json
|
||||
run: pnpm generatePluginJson dist/allplugins.json
|
||||
|
||||
- name: Generate Equicord plugin list
|
||||
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
||||
|
@ -69,17 +99,18 @@ jobs:
|
|||
rm release/*.map
|
||||
|
||||
- name: Upload Equicord Stable
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
run: |
|
||||
gh release upload latest --clobber dist/release/*
|
||||
|
||||
- name: Upload Equicord Dev
|
||||
if: ${{ github.ref_name == 'dev' }}
|
||||
- name: Move Files To Date Time dir
|
||||
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
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "build"
|
||||
path: "dist/release/*"
|
||||
name: "buildStable"
|
||||
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:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Every day at midnight
|
||||
- cron: 0 0 * * *
|
||||
|
||||
jobs:
|
||||
|
@ -19,7 +18,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
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
|
||||
uses: actions/setup-node@v4
|
||||
|
|
64
.github/workflows/uploadBuilds.yml
vendored
64
.github/workflows/uploadBuilds.yml
vendored
|
@ -1,9 +1,11 @@
|
|||
name: Upload Builds
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: [Release]
|
||||
workflows: [Release Stable, Release Dev]
|
||||
types: [completed]
|
||||
branches: [main, dev]
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
env:
|
||||
FORCE_COLOR: true
|
||||
REPO: Equicord/Builds
|
||||
|
@ -15,41 +17,9 @@ concurrency:
|
|||
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
|
||||
|
@ -60,21 +30,37 @@ jobs:
|
|||
git config --global user.email actions@github.com
|
||||
|
||||
- name: Download build artifact from triggered workflow
|
||||
if: ${{ github.event.workflow_run.head_branch == 'main' }}
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
name: build
|
||||
name: buildStable
|
||||
path: ./release
|
||||
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
|
||||
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
|
||||
mkdir -p stable/$TIME
|
||||
cp -r ../release/* ./stable/$TIME
|
||||
|
||||
git add -A
|
||||
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
|
||||
cd builds
|
||||
|
||||
mkdir -p devbuilds/$DATE/$TIME
|
||||
cp -r ../release/* ./devbuilds/$DATE/$TIME
|
||||
mkdir -p devbuilds/$TIME
|
||||
cp -r ../release/* ./devbuilds/$TIME
|
||||
|
||||
git add -A
|
||||
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
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_run:
|
||||
workflows: [Release]
|
||||
workflows: [Release Stable]
|
||||
types: [completed]
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: 0 0 * * *
|
||||
env:
|
||||
FORCE_COLOR: true
|
||||
REPO: Equicord/Equibored
|
||||
|
@ -16,7 +18,6 @@ jobs:
|
|||
Upload:
|
||||
name: Upload Plugins
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
Loading…
Reference in a new issue