ci: group dependabot prs and run lint&build for every push&pr (#233)
* ci: group all non-major deps for dependabot closes: #222 * ci: run lint and build on every push * ci: upload xpi to artifact * ci: fix lint:check script * ci: fix dist path
This commit is contained in:
		
							parent
							
								
									0fd238cfac
								
							
						
					
					
						commit
						7f062b198a
					
				
							
								
								
									
										5
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
								
							@ -9,3 +9,8 @@ updates:
 | 
			
		||||
    directory: "/" # Location of package manifests
 | 
			
		||||
    schedule:
 | 
			
		||||
      interval: "weekly"
 | 
			
		||||
    groups:
 | 
			
		||||
      all-non-major:
 | 
			
		||||
        update-types:
 | 
			
		||||
          - "minor"
 | 
			
		||||
          - "patch"
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										65
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										65
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,65 @@
 | 
			
		||||
name: CI
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
  pull_request:
 | 
			
		||||
    branches:
 | 
			
		||||
      - main
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  lint:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    env:
 | 
			
		||||
      GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
 | 
			
		||||
      - name: Setup Node.js
 | 
			
		||||
        uses: actions/setup-node@v4
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 20
 | 
			
		||||
          cache: npm
 | 
			
		||||
 | 
			
		||||
      - name: Install deps
 | 
			
		||||
        run: |
 | 
			
		||||
          npm install
 | 
			
		||||
 | 
			
		||||
      - name: Run Lint
 | 
			
		||||
        run: |
 | 
			
		||||
          npm run lint:check
 | 
			
		||||
 | 
			
		||||
  build:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    env:
 | 
			
		||||
      GITHUB_TOKEN: ${{ secrets.GitHub_TOKEN }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v4
 | 
			
		||||
        with:
 | 
			
		||||
          fetch-depth: 0
 | 
			
		||||
 | 
			
		||||
      - name: Setup Node.js
 | 
			
		||||
        uses: actions/setup-node@v4
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: 20
 | 
			
		||||
          cache: npm
 | 
			
		||||
 | 
			
		||||
      - name: Install deps
 | 
			
		||||
        run: |
 | 
			
		||||
          npm install
 | 
			
		||||
 | 
			
		||||
      - name: Run Build
 | 
			
		||||
        run: |
 | 
			
		||||
          npm run build
 | 
			
		||||
 | 
			
		||||
      - name: Upload build result
 | 
			
		||||
        uses: actions/upload-artifact@v4
 | 
			
		||||
        with:
 | 
			
		||||
          name: build-result
 | 
			
		||||
          path: |
 | 
			
		||||
            build
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -27,7 +27,7 @@ jobs:
 | 
			
		||||
          node-version: 20
 | 
			
		||||
 | 
			
		||||
      - name: Install deps
 | 
			
		||||
        run: npm install -f
 | 
			
		||||
        run: npm install
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        run: |
 | 
			
		||||
 | 
			
		||||
@ -22,7 +22,8 @@
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "start": "zotero-plugin serve",
 | 
			
		||||
    "build": "tsc --noEmit && zotero-plugin build",
 | 
			
		||||
    "lint": "prettier --write . && eslint . --fix",
 | 
			
		||||
    "lint:check": "prettier --check . && eslint .",
 | 
			
		||||
    "lint:fix": "prettier --write . && eslint . --fix",
 | 
			
		||||
    "release": "zotero-plugin release",
 | 
			
		||||
    "test": "echo \"Error: no test specified\" && exit 1",
 | 
			
		||||
    "update-deps": "npm update --save"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user