Skip to content

Commit

Permalink
build: github action for build and lint on push or pr to main
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienMartel committed Aug 1, 2023
1 parent 7c7feaf commit 1514043
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 156 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main_branch_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Main Branch Trigger

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
main_branch_job:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install pnpm
run: curl -L https://unpkg.com/@pnpm/self-installer | node

- name: Install dependencies
run: pnpm install

- name: Build step
run: pnpm build

- name: Lint step
run: pnpm lint
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"postinstall": "pnpm build",
"build": "tsc",
"lint": "eslint",
"prepublish": "pnpm build && pnpm release",
"release": "standard-version",
"prepare": "husky install"
Expand All @@ -29,6 +30,7 @@
"@monogram/prettier-config": "^0.2.0",
"@types/inquirer": "^9.0.3",
"@types/node": "^20.4.5",
"eslint": "^8.46.0",
"husky": "^8.0.3",
"standard-version": "^9.5.0",
"typescript": "^5.1.6"
Expand Down
Loading

0 comments on commit 1514043

Please sign in to comment.