File tree Expand file tree Collapse file tree 9 files changed +101
-145
lines changed Expand file tree Collapse file tree 9 files changed +101
-145
lines changed Original file line number Diff line number Diff line change
1
+ # In the future, I'd like to fold this into its own action under the Mithril.js
2
+ # org and include `actions/checkout` as well. It'd simplify maintenance a bit
3
+ # and I could reuse it across multiple repos.
4
+ name : Setup CI context
5
+ description : Sets up repo and Node context and installs packages
6
+
7
+ inputs :
8
+ # See supported Node.js release schedule here:
9
+ # https://github.com/nodejs/Release
10
+ node-version :
11
+ default : 20
12
+ description : The Node version to use
13
+
14
+ runs :
15
+ using : composite
16
+ steps :
17
+ - uses : actions/setup-node@v4
18
+ with :
19
+ node-version : ${{ inputs.node-version }}
20
+ - run : npm ci
21
+ shell : bash
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,25 +10,11 @@ concurrency: prr:deploy
10
10
11
11
jobs :
12
12
merge :
13
-
14
13
runs-on : ubuntu-latest
15
14
16
- strategy :
17
- matrix :
18
- node-version : [16.x]
19
-
20
15
steps :
21
- - uses : actions/checkout@v3
22
- with :
23
- ref : ' next'
24
- fetch-depth : 0
25
-
26
- - name : Use Node.js ${{ matrix.node-version }}
27
- uses : actions/setup-node@v3
28
- with :
29
- node-version : ${{ matrix.node-version }}
30
- cache : ' npm'
31
- - run : npm ci
16
+ - run : git clone --depth=0 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
17
+ - uses : ./.github/actions/setup
32
18
- run : npm run build
33
19
- run : npx pr-release merge --target master --source next --commit --force --clean --changelog ./docs/recent-changes.md --compact --minimize-semver-change
34
20
env :
Original file line number Diff line number Diff line change 1
- name : ' Push `master`'
1
+ name : Warn on pushing to `master`
2
2
on :
3
3
pull_request :
4
4
types : [opened]
5
- branches : ['master']
5
+ branches : [master]
6
+ permissions :
7
+ issues : write
6
8
jobs :
7
9
comment :
8
10
runs-on : ubuntu-latest
9
11
steps :
10
- - uses : actions/github-script@v3
11
- with :
12
- github-token : ${{secrets.GITHUB_TOKEN}}
13
- script : |
14
- await github.issues.createComment({
15
- issue_number: context.issue.number,
16
- owner: context.repo.owner,
17
- repo: context.repo.repo,
18
- body: `⚠⚠⚠ Hey @${context.actor}, did you mean to open this against \`next\`? ⚠⚠⚠`
19
- })
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
Original file line number Diff line number Diff line change @@ -7,24 +7,11 @@ concurrency: prr:deploy
7
7
8
8
jobs :
9
9
pr :
10
-
11
10
runs-on : ubuntu-latest
12
11
13
- strategy :
14
- matrix :
15
- node-version : [16.x]
16
-
17
12
steps :
18
- - uses : actions/checkout@v3
19
- with :
20
- ref : ' next'
21
- fetch-depth : 0
22
- - name : Use Node.js ${{ matrix.node-version }}
23
- uses : actions/setup-node@v3
24
- with :
25
- node-version : ${{ matrix.node-version }}
26
- cache : ' npm'
27
- - run : npm ci
13
+ - run : git clone --depth=0 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
14
+ - uses : ./.github/actions/setup
28
15
- run : npm run build
29
16
- run : npx pr-release rollback --verbose --target master --source next --verbose --ignore 'package*' --ignore docs/changelog.md --ignore docs/recent-changes.md
30
17
env :
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : pr
1
+ name : test-next-push
2
2
3
3
on :
4
4
push :
5
5
branches : [ next ]
6
-
7
6
workflow_dispatch :
8
7
9
8
concurrency : prr:pre-release
10
9
11
10
jobs :
12
- pr :
11
+ build :
12
+ uses : ./.github/workflows/test.yml
13
13
14
+ publish-prerelease :
15
+ needs : build
14
16
runs-on : ubuntu-latest
15
-
16
- strategy :
17
- matrix :
18
- node-version : [16.x]
19
-
20
17
steps :
21
- - uses : actions/checkout@v3
22
- - name : Use Node.js ${{ matrix.node-version }}
23
- uses : actions/setup-node@v3
24
- with :
25
- node-version : ${{ matrix.node-version }}
26
- cache : ' npm'
27
- - run : npm ci
18
+ - run : git clone --depth=0 https://github.com/MithrilJS/mithril.js.git && cd mithril.js
19
+ - uses : ./.github/actions/setup
28
20
- run : npm run build
29
21
- run : npx pr-release pr --verbose --target master --source next --compact --verbose --minimize-semver-change
30
22
env :
Original file line number Diff line number Diff line change
1
+ name : test
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [ next ]
6
+ workflow_dispatch :
7
+ workflow_call :
8
+
9
+ permissions :
10
+ actions : write
11
+ contents : read
12
+
13
+ # This uses actions/checkout instead of `git clone` directly since it's way
14
+ # easier than parsing everything out.
15
+
16
+ jobs :
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
27
+
28
+ 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
34
+
35
+ build-js :
36
+ 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
42
+
43
+ test-js :
44
+ needs : build-js
45
+ runs-on : ubuntu-latest
46
+ strategy :
47
+ matrix :
48
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
49
+ node-version :
50
+ - 16
51
+ - 18
52
+ - 20
53
+ - 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
You can’t perform that action at this time.
0 commit comments