Skip to content

docs(core.js): 添加#region #219

docs(core.js): 添加#region

docs(core.js): 添加#region #219

Workflow file for this run

name: Update Versions and Upload to Releases Branch
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-and-release:
if: ${{ github.actor != 'github-actions[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
run_install: true
- name: Update versions
run: pnpm run update-versions
- name: Build
run: pnpm run build
- name: Configure Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Check for changes in userscripts
id: check_changes
run: |
git add userscripts
if git diff --staged --quiet; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Commit and push to master
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git commit -m "ci: Update versions"
git push origin master
- name: Create and push to releases branch
run: |
git checkout --orphan releases
git rm -rf .
if [ ! -d "dist/userscripts" ]; then
echo "Error: dist/userscripts directory not found" >&2
exit 1
fi
git add dist
git commit -m "ci: Update release files"
git push origin releases --force