Revert "Rework More"

This reverts commit 4ae1d01dd3.
This commit is contained in:
thororen1234 2024-11-01 11:23:16 -04:00
parent 17a1e480be
commit a16f241b85
5 changed files with 54 additions and 184 deletions

View file

@ -1,8 +1,9 @@
name: Release Stable
name: Release
on:
push:
branches:
- main
- dev
env:
FORCE_COLOR: true
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
@ -10,40 +11,9 @@ env:
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 Stable
name: Build Equicord
runs-on: ubuntu-latest
needs: Date
env:
DATE: ${{ needs.Date.outputs.DATE }}
TIME: ${{ needs.Date.outputs.TIME }}
steps:
- uses: actions/checkout@v4
@ -66,7 +36,7 @@ jobs:
run: pnpm buildStandalone
- name: Generate plugin list
run: pnpm generatePluginJson dist/allplugins.json
run: pnpm generatePluginJson dist/vencordplugins.json
- name: Generate Equicord plugin list
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
@ -99,18 +69,17 @@ jobs:
rm release/*.map
- name: Upload Equicord Stable
if: ${{ github.ref_name == 'main' }}
run: |
gh release upload latest --clobber dist/release/*
- name: Move Files To Date Time dir
- name: Upload Equicord Dev
if: ${{ github.ref_name == 'dev' }}
run: |
mkdir -p $DATE/$TIME
mv /dist/release/* $DATE/$TIME
cd $DATE/$TIME
echo '$DATE/$TIME' >> time.txt
gh release upload devbuild --clobber dist/release/*
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: "buildStable"
path: "$DATE/$TIME/*"
name: "build"
path: "dist/release/*"

View file

@ -1,113 +0,0 @@
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/*"

View file

@ -2,6 +2,7 @@ name: Test Patches
on:
workflow_dispatch:
schedule:
# Every day at midnight
- cron: 0 0 * * *
jobs:
@ -18,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- name: Use Node.js 20
uses: actions/setup-node@v4

View file

@ -1,11 +1,9 @@
name: Upload Builds
on:
workflow_dispatch:
workflow_run:
workflows: [Release Stable, Release Dev]
workflows: [Release]
types: [completed]
schedule:
- cron: 0 0 * * *
branches: [main, dev]
env:
FORCE_COLOR: true
REPO: Equicord/Builds
@ -17,9 +15,41 @@ 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
@ -30,37 +60,21 @@ 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: buildStable
name: build
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/$TIME
cp -r ../release/* ./stable/$TIME
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"
@ -72,8 +86,8 @@ jobs:
git clone https://$USERNAME:$TOKEN@github.com/$REPO.git builds
cd builds
mkdir -p devbuilds/$TIME
cp -r ../release/* ./devbuilds/$TIME
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"

View file

@ -1,11 +1,9 @@
name: Upload Plugins JSONs
on:
workflow_dispatch:
workflow_run:
workflows: [Release Stable]
workflows: [Release]
types: [completed]
schedule:
- cron: 0 0 * * *
branches: [main]
env:
FORCE_COLOR: true
REPO: Equicord/Equibored
@ -18,6 +16,7 @@ jobs:
Upload:
name: Upload Plugins
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4