mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
chore: add js libs auto-update workflow (#39037)
* chore: add js libs auto-update workflow * chore: exclude js libs from minimum age
This commit is contained in:
1 parent
302730f616
commit
f0ac5fb116
2 files changed
+79
No files matched your search
@@ -0,0 +1,76 @@
|
||||
name: Update JS Libraries
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version to update to'
|
||||
required: true
|
||||
type: string
|
||||
source:
|
||||
description: 'Source of the update'
|
||||
required: false
|
||||
type: string
|
||||
default: 'manual'
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-js-libs:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: master
|
||||
|
||||
- uses: pnpm/action-setup@v4
|
||||
name: Install pnpm
|
||||
with:
|
||||
run_install: false
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Update @supabase/*-js packages in pnpm-workspace.yaml
|
||||
run: |
|
||||
# Update @supabase/supabase-js
|
||||
sed -i "s/'@supabase\/supabase-js': .*/'@supabase\/supabase-js': ^${{ github.event.inputs.version }}/" pnpm-workspace.yaml
|
||||
|
||||
# Update @supabase/auth-js
|
||||
sed -i "s/'@supabase\/auth-js': .*/'@supabase\/auth-js': ^${{ github.event.inputs.version }}/" pnpm-workspace.yaml
|
||||
|
||||
# Update @supabase/realtime-js
|
||||
sed -i "s/'@supabase\/realtime-js': .*/'@supabase\/realtime-js': ^${{ github.event.inputs.version }}/" pnpm-workspace.yaml
|
||||
|
||||
echo "Updated pnpm-workspace.yaml:"
|
||||
cat pnpm-workspace.yaml
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm i
|
||||
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: 'feat: update @supabase/*-js libraries to v${{ github.event.inputs.version }}'
|
||||
title: 'feat: update @supabase/*-js libraries to v${{ github.event.inputs.version }}'
|
||||
body: |
|
||||
This PR updates @supabase/*-js libraries to version ${{ github.event.inputs.version }}.
|
||||
|
||||
**Source**: ${{ github.event.inputs.source }}
|
||||
|
||||
**Changes**:
|
||||
- Updated @supabase/supabase-js to ^${{ github.event.inputs.version }}
|
||||
- Updated @supabase/auth-js to ^${{ github.event.inputs.version }}
|
||||
- Updated @supabase/realtime-js to ^${{ github.event.inputs.version }}
|
||||
- Refreshed pnpm-lock.yaml
|
||||
|
||||
This PR was created automatically.
|
||||
branch: 'gha/auto-update-js-libs-v${{ github.event.inputs.version }}'
|
||||
base: 'master'
|
||||
Reference in new issue
Block a user