ModularVencord/.github/workflows/change-reporter.yml
2024-07-06 20:22:28 -04:00

66 lines
2.2 KiB
YAML

name: Change Reporter
on:
workflow_dispatch:
schedule:
# Every day at midnight
- cron: 0 0 * * *
jobs:
change-reporter:
if: github.repository == 'Vendicated/Vencord'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'schedule' }}
with:
ref: dev
- uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
- uses: pnpm/action-setup@v4 # Install pnpm using packageManager key in package.json
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ^20.11.0
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install Google Chrome
id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
install-dependencies: true
- name: Build Vencord web standalone
run: pnpm buildWebStandalone --skip-extension
- name: Create Report (Stable)
timeout-minutes: 10
run: |
cd packages/discord-types
pnpm change-reporter
env:
CHANNEL: stable
CHROMIUM_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
VENCORD_DIST: ../../dist/browser.js
- name: Create Report (Canary)
timeout-minutes: 10
if: ${{ !cancelled() }} # run even if previous one failed
run: |
cd packages/discord-types
pnpm change-reporter
env:
CHANNEL: canary
CHROMIUM_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
VENCORD_DIST: ../../dist/browser.js