mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-18 13:23:28 -05:00
v1.10.8
This commit is contained in:
parent
ffce474655
commit
2b98316d20
4 changed files with 40 additions and 180 deletions
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
|
@ -6,10 +6,40 @@ on:
|
|||
env:
|
||||
FORCE_COLOR: true
|
||||
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||
REPO: Equicord/Equibored
|
||||
USERNAME: GitHub-Actions
|
||||
|
||||
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 }}
|
||||
|
||||
Build:
|
||||
name: Build Equicord
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -68,23 +98,21 @@ jobs:
|
|||
rm release/*.map
|
||||
|
||||
- name: get-npm-version
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||
|
||||
- name: Upload Equicord Stable
|
||||
if: ${{ github.ref_name == 'main' }}
|
||||
- name: Upload Equicord
|
||||
run: |
|
||||
gh release create v${{ steps.package-version.outputs.current-version}} --latest=false
|
||||
gh release upload v${{ steps.package-version.outputs.current-version}} --clobber dist/release/*
|
||||
|
||||
- name: Upload Equicord Dev
|
||||
if: ${{ github.ref_name == 'dev' }}
|
||||
- name: Upload Plugins JSON to Equibored repo
|
||||
run: |
|
||||
gh release upload devbuild --clobber dist/release/*
|
||||
git clone https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git plugins
|
||||
cd plugins
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "build"
|
||||
path: "dist/release/*"
|
||||
cp dist/release/*plugins.json .
|
||||
git add -A
|
||||
|
||||
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||
git push --force https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git
|
||||
|
|
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
|
@ -11,35 +11,7 @@ on:
|
|||
|
||||
jobs:
|
||||
Test:
|
||||
name: Test For Pushes
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
||||
|
||||
- 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: Lint & Test if desktop version compiles
|
||||
run: pnpm test
|
||||
|
||||
- name: Test if web version compiles
|
||||
run: pnpm buildWeb
|
||||
|
||||
- name: Test if plugin structure is valid
|
||||
run: pnpm generatePluginJson
|
||||
|
||||
TestForPRs:
|
||||
name: Test For Pull Requests
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
94
.github/workflows/uploadBuilds.yml
vendored
94
.github/workflows/uploadBuilds.yml
vendored
|
@ -1,94 +0,0 @@
|
|||
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
46
.github/workflows/uploadPlugins.yml
vendored
|
@ -1,46 +0,0 @@
|
|||
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
|
Loading…
Reference in a new issue