Skip to content

Commit 1c9042f

Browse files
committed
init commit
0 parents  commit 1c9042f

8 files changed

Lines changed: 155 additions & 0 deletions

File tree

.github/renovate.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
extends: ['github>zotero-plugin-dev/renovate-config'],
3+
ignorePaths: [],
4+
}

.github/workflows/autofix.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: autofix.ci
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_call:
8+
inputs:
9+
command:
10+
required: false
11+
type: string
12+
default: pnpm run lint --fix
13+
14+
jobs:
15+
autofix:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
20+
steps:
21+
- name: Setup JS
22+
uses: zotero-plugin-dev/workflows/setup-js@main
23+
24+
- name: Fix
25+
run: ${{ inputs.command }}
26+
if: ${{ inputs.command != '' }}
27+
28+
- name: Commit
29+
uses: autofix-ci/action@v1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Shared Workflows for Zotero Plugin Development
2+
3+
A collection of reusable GitHub Actions workflows and composite actions for Zotero Plugin projects.
4+
5+
## Features
6+
7+
### Composite actions
8+
9+
- [x] Setup JavaScript (check, setup nodejs, setup pnpm, install dependenies)
10+
11+
### Reusable GitHub Actions workflows
12+
13+
- [ ] Autofix.ci
14+
- [ ] Release (production)
15+
- [ ] Continuous Releases: run on pr, run build and upload xpi to Artifacts, add comment to pr/issue, relate: https://github.com/zotero-plugin-dev/zotero-plugin-scaffold/issues/148
16+
- [ ] Issue bot
17+
- [ ] Add/remove label to issue on user/owner comment
18+
- [ ] Close issue with `invalid` label
19+
- [ ] Close issue with `/d` comment
20+
- [ ] Close stale issue
21+
- [ ] Lock stable closed issue
22+
23+
## Usage
24+
25+
```bash
26+
# todo
27+
```
28+
29+
## Lincense
30+
31+
MIT License © 2025-PRESENT Northword
32+
33+
## Thanks
34+
35+
- [sxzz/workflows](https://github.com/sxzz/workflows)

examples/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "@zotero-plugin-dev/workflows",
3+
"private": true,
4+
"packageManager": "[email protected]",
5+
"type": "module",
6+
"license": "MIT",
7+
"scripts": {
8+
"lint": "prettier . --write"
9+
},
10+
"devDependencies": {
11+
"prettier": "^3.6.2"
12+
},
13+
"prettier": {}
14+
}

pnpm-lock.yaml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

setup-js/action.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Setup JavaScript
2+
description: Setup JavaScript environment
3+
4+
inputs:
5+
persist-credentials:
6+
description: Whether to configure the token or SSH key with the local git config
7+
default: false
8+
9+
fetch-all:
10+
description: Whether to fetch all history for all branches and tags.
11+
default: false
12+
13+
node-version:
14+
description: "Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0."
15+
default: "lts/*"
16+
17+
auto-install:
18+
description: Whether to automatically install dependencies.
19+
default: true
20+
21+
package-manager:
22+
description: "Package manager to use. Examples: npm, yarn, pnpm."
23+
default: pnpm
24+
25+
runs:
26+
using: composite
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@5
30+
with:
31+
persist-credentials: ${{ inputs.persist-credentials }}
32+
fetch-depth: "${{ inputs.fetch-all == 'true' && '0' || '1' }}"
33+
34+
- name: Install pnpm
35+
if: ${{ inputs.package-manager == "pnpm" }}
36+
uses: pnpm/action-setup@4
37+
38+
- name: Setup node
39+
uses: actions/setup-node@6
40+
with:
41+
node-version: ${{ inputs.node-version }}
42+
cache: ${{ inputs.package-manager }}
43+
registry-url: "https://registry.npmjs.org"
44+
45+
- name: Install dependencies
46+
shell: bash
47+
run: ${{ inputs.package-manager }} install
48+
if: ${{ inputs.auto-install }}

0 commit comments

Comments
 (0)