File tree Expand file tree Collapse file tree 9 files changed +102
-70
lines changed Expand file tree Collapse file tree 9 files changed +102
-70
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Run npm task
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ task :
7
+ type : string
8
+ required : true
9
+ node-version :
10
+ type : number
11
+ default : 20
12
+ continue-on-error :
13
+ type : boolean
14
+ default : false
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ # This uses actions/checkout instead of `git clone` directly since it's way
20
+ # easier than parsing everything out.
21
+
22
+ jobs :
23
+ run-task :
24
+ name : npm run ${{ inputs.task }}
25
+ continue-on-error : ${{ inputs.continue-on-error }}
26
+ runs-on :
27
+ - ubuntu-latest
28
+ - windows-latest
29
+ - macos-latest
30
+ steps :
31
+ - uses : actions/checkout@v4
32
+ with :
33
+ fetch-depth : 1
34
+ - uses : actions/setup-node@v4
35
+ with :
36
+ node-version : ${{ inputs.node-version }}
37
+ - run : npm ci
38
+ - run : npm run ${{ inputs.task }}
Original file line number Diff line number Diff line change
1
+ name : Post comment
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ url :
7
+ type : string
8
+ required : true
9
+ message :
10
+ type : string
11
+ required : true
12
+
13
+ jobs :
14
+ notify :
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ - run : gh issue comment "$ISSUE_URL" --body "$MESSAGE"
18
+ env :
19
+ ISSUE_URL : ${{ inputs.url }}
20
+ MESSAGE : ${{ inputs.message }}
21
+ GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 1
1
name : Ping triage on issue create
2
-
3
2
on :
4
3
issues :
5
4
types : [opened]
6
-
5
+ permissions :
6
+ issues : write
7
7
jobs :
8
8
notify :
9
- runs-on : ubuntu-latest
10
- steps :
11
- - run : gh issue comment ${{ github.event.issue.url }} --body '@MithrilJS/triage Please take a look.'
12
- env :
13
- GITHUB_TOKEN : ${{ github.token }}
9
+ uses : ./.github/workflows/_post-comment.yml
10
+ with :
11
+ url : ${{ github.event.issue.url }}
12
+ message : ' @MithrilJS/triage Please take a look.'
Original file line number Diff line number Diff line change 13
13
runs-on : ubuntu-latest
14
14
15
15
steps :
16
- - run : git clone --depth=1 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
17
- - uses : ./.github/actions/setup
16
+ - uses : actions/checkout@v4
17
+ with :
18
+ ref : next
19
+ - uses : actions/setup-node@v4
20
+ with :
21
+ node-version : 20
22
+ - run : npm ci
18
23
- run : npm run build
19
24
- run : npx pr-release merge --target master --source next --commit --force --clean --changelog ./docs/recent-changes.md --compact --minimize-semver-change
20
25
env :
Original file line number Diff line number Diff line change @@ -7,11 +7,7 @@ permissions:
7
7
issues : write
8
8
jobs :
9
9
comment :
10
- runs-on : ubuntu-latest
11
- steps :
12
- - run : |
13
- gh issue comment ${{ github.event.pull_request.url }} \
14
- --body '⚠⚠⚠ Hey @${{ github.actor }}, did you mean to open this against `next`? ⚠⚠⚠'
15
- env:
16
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17
- name: Post alert comment
10
+ uses : ./.github/workflows/_post-comment.yml
11
+ with :
12
+ url : ${{ github.event.pull_request.url }}
13
+ message : ⚠⚠⚠ Hey @${{ github.actor }}, did you mean to open this against `next`? ⚠⚠⚠
Original file line number Diff line number Diff line change 10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
- - run : git clone --depth=1 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
14
- - uses : ./.github/actions/setup
13
+ - uses : actions/checkout@v4
14
+ - uses : actions/setup-node@v4
15
+ with :
16
+ node-version : 20
17
+ - run : npm ci
15
18
- run : npm run build
16
19
- run : npx pr-release rollback --verbose --target master --source next --verbose --ignore 'package*' --ignore docs/changelog.md --ignore docs/recent-changes.md
17
20
env :
Original file line number Diff line number Diff line change 8
8
concurrency : prr:pre-release
9
9
10
10
jobs :
11
- build :
11
+ test :
12
12
uses : ./.github/workflows/test.yml
13
13
14
14
publish-prerelease :
15
- needs : build
15
+ needs : test
16
16
runs-on : ubuntu-latest
17
17
steps :
18
- - run : git clone --depth=1 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
19
- - uses : ./.github/actions/setup
18
+ - uses : actions/checkout@v4
19
+ - uses : actions/setup-node@v4
20
+ with :
21
+ node-version : 20
22
+ - run : npm ci
20
23
- run : npm run build
21
24
- run : npx pr-release pr --verbose --target master --source next --compact --verbose --minimize-semver-change
22
25
env :
Original file line number Diff line number Diff line change @@ -15,34 +15,24 @@ permissions:
15
15
16
16
jobs :
17
17
lint-docs :
18
- # https://github.com/MithrilJS/mithril.js/issues/2898
19
- # Semantics aren't quite what I'd prefer. This is what I'd really want:
20
- # https://github.com/actions/runner/issues/2347#issue-comment-box
21
- continue-on-error : true
22
- runs-on : ubuntu-latest
23
- steps :
24
- - uses : actions/checkout@v4
25
- - uses : ./.github/actions/setup
26
- - run : npm run lint:docs
18
+ uses : ./.github/workflows/_npm-task.yml
19
+ with :
20
+ task : lint:docs
21
+ continue-on-error : true
27
22
28
23
lint-js :
29
- runs-on : ubuntu-latest
30
- steps :
31
- - uses : actions/checkout@v4
32
- - uses : ./.github/actions/setup
33
- - run : npm run lint:js
24
+ uses : ./.github/workflows/_npm-task.yml
25
+ with :
26
+ task : lint:js
34
27
35
28
build-js :
36
29
needs : lint-js
37
- runs-on : ubuntu-latest
38
- steps :
39
- - uses : actions/checkout@v4
40
- - uses : ./.github/actions/setup
41
- - run : npm run build
30
+ uses : ./.github/workflows/_npm-task.yml
31
+ with :
32
+ task : build
42
33
43
34
test-js :
44
35
needs : build-js
45
- runs-on : ubuntu-latest
46
36
strategy :
47
37
matrix :
48
38
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
51
41
- 18
52
42
- 20
53
43
- 22
54
- steps :
55
- - uses : actions/checkout@v4
56
- - uses : ./.github/actions/setup
57
- with :
58
- node-version : ${{ matrix.node-version }}
59
- - run : npm run test:js
44
+ uses : ./.github/workflows/_npm-task.yml
45
+ with :
46
+ node-version : ${{ matrix.node-version }}
47
+ task : test:js
You can’t perform that action at this time.
0 commit comments