Skip to content

Commit

Permalink
ci: Add linter workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradumnasaraf committed Jun 26, 2023
1 parent 436ad88 commit 9cf5a20
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Linter

on:
workflow_dispatch:
push:
paths:
- "**.js"
pull_request:
paths:
- "**.js"

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checking and cloning the repo
uses: actions/checkout@v3


- name: Node Instllation
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint
6 changes: 3 additions & 3 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
node-version: "18"
- run: npm ci
- name: Prettier
run: npx prettier --write '**/*.js' '*.{js,md}'
run: npm run format
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
commit_message: 'style: format files'
commit_message: "style: format files"
15 changes: 7 additions & 8 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
github-token: ${{ secrets.PA_TOKEN }}
version-file: "./package.json,./package-lock.json"

- name: create release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
- name: Create Release
if: steps.changelog.outputs.skipped == 'false'
uses: ncipollo/release-action@v1
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
token: ${{ secrets.PA_TOKEN }}
tag : ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}

1 comment on commit 9cf5a20

@vercel
Copy link

@vercel vercel bot commented on 9cf5a20 Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.