Skip to content

Commit eab1bc9

Browse files
authored
Merge pull request #16 from GrantBirki/updates
Updates
2 parents bae39ff + c29bee4 commit eab1bc9

File tree

6 files changed

+1951
-1880
lines changed

6 files changed

+1951
-1880
lines changed

.github/workflows/lint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: lint
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
- 'releases/*'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: setup node
19+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
20+
with:
21+
node-version-file: .node-version
22+
cache: 'npm'
23+
24+
- name: install dependencies
25+
run: npm ci
26+
27+
- name: lint
28+
run: |
29+
npm run format-check
30+
npm run lint
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
1-
# `dist/index.js` is a special file in Actions.
2-
# When you reference an action with `uses:` in a workflow,
3-
# `index.js` is the code that will run.
4-
# For our project, we generate this file through a build process from other source files.
5-
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
6-
name: Check dist/
1+
name: package-check
72

83
on:
9-
pull_request:
104
push:
115
branches:
126
- main
13-
- 'releases/*'
7+
pull_request:
148
workflow_dispatch:
159

10+
permissions:
11+
contents: read
12+
1613
jobs:
17-
check-dist:
14+
package-check:
1815
runs-on: ubuntu-latest
1916

2017
steps:
2118
- uses: actions/checkout@v3
2219

2320
- name: setup node
24-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # pin@v3.6.0
2522
with:
2623
node-version-file: .node-version
24+
cache: 'npm'
2725

2826
- name: install dependencies
2927
run: npm ci
3028

3129
- name: rebuild the dist/ directory
32-
run: npm run package
30+
run: npm run bundle
3331

3432
- name: compare the expected and actual dist/ directories
3533
run: |
@@ -41,7 +39,7 @@ jobs:
4139
id: diff
4240

4341
# If index.js was different than expected, upload the expected version as an artifact
44-
- uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # pin@v3.0.0
42+
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2
4543
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
4644
with:
4745
name: dist

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Comment Action 💬
22

3-
[![Check dist/](https://github.com/GrantBirki/comment/actions/workflows/check-dist.yml/badge.svg)](https://github.com/GrantBirki/comment/actions/workflows/check-dist.yml)
3+
[![package-check](https://github.com/GrantBirki/comment/actions/workflows/package-check.yml/badge.svg)](https://github.com/GrantBirki/comment/actions/workflows/package-check.yml) [![lint](https://github.com/GrantBirki/comment/actions/workflows/lint.yml/badge.svg)](https://github.com/GrantBirki/comment/actions/workflows/lint.yml)
44

55
GitHub Action to create, update, or add a reaction to any issue or pull request
66

dist/index.js

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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)