52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: Publish Plugins
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- 'plugins/**'
|
|
- 'public/**'
|
|
- 'scripts/publish-plugins.sh'
|
|
- '.github/workflows/publish-plugins.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish Plugins
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Install Dependencies
|
|
run: npm ci --omit=dev --ignore-scripts
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- name: Publish Plugins (Main Repository)
|
|
if: github.repository == 'LNReader/lnreader-plugins'
|
|
run: npm run publish:plugins 2>> $GITHUB_STEP_SUMMARY
|
|
shell: bash
|
|
|
|
- name: Publish Plugins (Fork - All Branches)
|
|
if: github.repository != 'LNReader/lnreader-plugins'
|
|
run: npm run publish:plugins -- --all-branches
|
|
shell: bash
|