[skip ci] ci: fix inconsistent formatting

main
V 1 year ago
parent 43011825af
commit 7b2bf08b8f
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -42,37 +42,37 @@ jobs:
- name: Clean up obsolete files - name: Clean up obsolete files
run: | run: |
rm -rf dist/*-unpacked Vencord.user.css vencordDesktopRenderer.css vencordDesktopRenderer.css.map rm -rf dist/*-unpacked Vencord.user.css vencordDesktopRenderer.css vencordDesktopRenderer.css.map
- name: Get some values needed for the release - name: Get some values needed for the release
id: release_values id: release_values
run: | run: |
echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV echo "release_tag=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Upload DevBuild as release - name: Upload DevBuild as release
run: | run: |
gh release upload devbuild --clobber dist/* gh release upload devbuild --clobber dist/*
gh release edit devbuild --title "DevBuild $RELEASE_TAG" gh release edit devbuild --title "DevBuild $RELEASE_TAG"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_TAG: ${{ env.release_tag }} RELEASE_TAG: ${{ env.release_tag }}
- name: Upload DevBuild to builds repo - name: Upload DevBuild to builds repo
run: | run: |
git config --global user.name "$USERNAME" git config --global user.name "$USERNAME"
git config --global user.email actions@github.com git config --global user.email actions@github.com
git clone https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git upload git clone https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git upload
cd upload cd upload
GLOBIGNORE=.git:.gitignore:README.md:LICENSE GLOBIGNORE=.git:.gitignore:README.md:LICENSE
rm -rf * rm -rf *
cp -r ../dist/* . cp -r ../dist/* .
git add -A git add -A
git commit -m "Builds for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" git commit -m "Builds for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
git push --force https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git git push --force https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git
env: env:
API_TOKEN: ${{ secrets.BUILDS_TOKEN }} API_TOKEN: ${{ secrets.BUILDS_TOKEN }}
GH_REPO: Vencord/builds GH_REPO: Vencord/builds
USERNAME: GitHub-Actions USERNAME: GitHub-Actions

@ -13,11 +13,11 @@ jobs:
- name: check that tag matches package.json version - name: check that tag matches package.json version
run: | run: |
pkg_version="v$(jq -r .version < package.json)" pkg_version="v$(jq -r .version < package.json)"
if [[ "${{ github.ref_name }}" != "$pkg_version" ]]; then if [[ "${{ github.ref_name }}" != "$pkg_version" ]]; then
echo "Tag ${{ github.ref_name }} does not match package.json version $pkg_version" >&2 echo "Tag ${{ github.ref_name }} does not match package.json version $pkg_version" >&2
exit 1 exit 1
fi fi
- uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json - uses: pnpm/action-setup@v2 # Install pnpm using packageManager key in package.json
@ -35,26 +35,26 @@ jobs:
- name: Publish extension - name: Publish extension
run: | run: |
# Do not fail so that even if chrome fails, firefox gets a shot. But also store exit code to fail workflow later # Do not fail so that even if chrome fails, firefox gets a shot. But also store exit code to fail workflow later
EXIT_CODE=0 EXIT_CODE=0
# Chrome # Chrome
cd dist/chromium-unpacked cd dist/chromium-unpacked
pnpx chrome-webstore-upload-cli@2.1.0 upload --auto-publish || EXIT_CODE=$? pnpx chrome-webstore-upload-cli@2.1.0 upload --auto-publish || EXIT_CODE=$?
# Firefox # Firefox
cd ../firefox-unpacked cd ../firefox-unpacked
npm i -g web-ext@7.4.0 web-ext-submit@7.4.0 npm i -g web-ext@7.4.0 web-ext-submit@7.4.0
web-ext-submit || EXIT_CODE=$? web-ext-submit || EXIT_CODE=$?
exit $EXIT_CODE exit $EXIT_CODE
env: env:
# Chrome # Chrome
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }} EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }} CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }} CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }} REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
# Firefox # Firefox
WEB_EXT_API_KEY: ${{ secrets.WEBEXT_USER }} WEB_EXT_API_KEY: ${{ secrets.WEBEXT_USER }}
WEB_EXT_API_SECRET: ${{ secrets.WEBEXT_SECRET }} WEB_EXT_API_SECRET: ${{ secrets.WEBEXT_SECRET }}

@ -2,8 +2,8 @@ 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:
@ -22,10 +22,10 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
pnpm install --frozen-lockfile pnpm install --frozen-lockfile
pnpm add puppeteer pnpm add puppeteer
sudo apt-get install -y chromium-browser sudo apt-get install -y chromium-browser
- name: Build web - name: Build web
run: pnpm buildWeb --standalone run: pnpm buildWeb --standalone
@ -33,25 +33,25 @@ jobs:
- 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=$(which chromium-browser) export CHROMIUM_BIN=$(which chromium-browser)
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.DISCORD_TOKEN }} DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_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=$(which chromium-browser) export CHROMIUM_BIN=$(which chromium-browser)
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.DISCORD_TOKEN }} DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

Loading…
Cancel
Save