2023-01-26 16:38:02 -05:00
|
|
|
name: Release Browser Extension
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Publish:
|
2023-06-09 15:48:18 -04:00
|
|
|
if: github.repository == 'Vendicated/Vencord'
|
2023-01-26 16:38:02 -05:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-05-06 22:54:25 -04:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-26 16:38:02 -05:00
|
|
|
|
|
|
|
- name: check that tag matches package.json version
|
|
|
|
run: |
|
2023-06-01 16:49:15 -04:00
|
|
|
pkg_version="v$(jq -r .version < package.json)"
|
|
|
|
if [[ "${{ github.ref_name }}" != "$pkg_version" ]]; then
|
|
|
|
echo "Tag ${{ github.ref_name }} does not match package.json version $pkg_version" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2023-01-26 16:38:02 -05:00
|
|
|
|
2024-05-06 22:54:25 -04:00
|
|
|
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
|
2023-01-26 16:38:02 -05:00
|
|
|
|
|
|
|
- name: Use Node.js 19
|
2024-05-06 22:54:25 -04:00
|
|
|
uses: actions/setup-node@v4
|
2023-01-26 16:38:02 -05:00
|
|
|
with:
|
2024-05-06 22:54:25 -04:00
|
|
|
node-version: 20
|
2023-01-26 16:38:02 -05:00
|
|
|
cache: "pnpm"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
|
|
|
|
- name: Build web
|
2024-05-29 05:45:44 -04:00
|
|
|
run: pnpm buildWebStandalone
|
2023-01-26 16:38:02 -05:00
|
|
|
|
|
|
|
- name: Publish extension
|
|
|
|
run: |
|
2023-06-01 16:49:15 -04:00
|
|
|
cd dist/chromium-unpacked
|
2023-10-08 21:56:41 -04:00
|
|
|
pnpx chrome-webstore-upload-cli@2.1.0 upload --auto-publish
|
2023-01-26 16:38:02 -05:00
|
|
|
env:
|
2023-06-01 16:49:15 -04:00
|
|
|
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
|
|
|
|
CLIENT_ID: ${{ secrets.CHROME_CLIENT_ID }}
|
|
|
|
CLIENT_SECRET: ${{ secrets.CHROME_CLIENT_SECRET }}
|
|
|
|
REFRESH_TOKEN: ${{ secrets.CHROME_REFRESH_TOKEN }}
|