Skip to content

Commit

Permalink
ci: lint PR title
Browse files Browse the repository at this point in the history
  • Loading branch information
st3v3nmw committed Sep 22, 2024
1 parent 2942f9a commit e0bf2d4
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 23 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
name: Lint and Test
name: Lint PR

on:
pull_request:
branches: [master]
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
workflow_dispatch:

env:
COREPACK_ENABLE_STRICT: 0
permissions:
pull-requests: read

jobs:
lint_and_test:
main:
name: Validate PR title
runs-on: ubuntu-latest

steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- uses: actions/checkout@v3

- name: Install Dependencies
run: npm install -g pnpm && pnpm install

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint and Test

on:
pull_request:
branches: [master]

env:
COREPACK_ENABLE_STRICT: 0

jobs:
lint_and_test:
runs-on: ubuntu-latest

steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- uses: actions/checkout@v3

- name: Install Dependencies
run: npm install -g pnpm && pnpm install

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test
2 changes: 1 addition & 1 deletion docs/docs/en/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ Example using `v1.9.2`:
5. Open and merge the PR into `master`.
6. Locally, switch back to `master` and pull the changes: `git switch master && git pull`
7. Create a git tag with the version: `git tag 1.9.2`
7. Create a git tag with the version: `git tag -a 1.9.2 -m "1.9.2"`
8. Push the tag: `git push --tags`. <br> You're all set! [This GitHub action](https://github.com/st3v3nmw/obsidian-spaced-repetition/blob/master/.github/workflows/release.yml) should pick it up, create a release, publish it, and update the live documentation.

0 comments on commit e0bf2d4

Please sign in to comment.