851330a52e
* refactor: Update Build Scripts And Workflows * chore: Update Prettier Workflow * chore: Update Publish Plugins Workflow * chore: Update Prettier Workflow * chore: Update Workflows * chore: Update Workflows * chore: Update Prettier Workflow * chore: Update Prettier Workflow
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Publish Plugins
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish Plugins
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install Dependencies
|
|
run: npm install --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
|