Skip to content

Commit 4f1618c

Browse files
Create npm-grunt.yml
1 parent 2677f2a commit 4f1618c

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/npm-grunt.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: NodeJS with Grunt
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Build
26+
run: |
27+
npm install
28+
grunt
29+
- name: Cache
30+
uses: actions/[email protected]
31+
with:
32+
# A list of files, directories, and wildcard patterns to cache and restore
33+
path:
34+
# An explicit key for restoring and saving the cache
35+
key:
36+
# An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.
37+
restore-keys: # optional
38+
# The chunk size used to split up large files during upload, in bytes
39+
upload-chunk-size: # optional
40+
# An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms
41+
enableCrossOsArchive: # optional, default is false
42+
# Fail the workflow if cache entry is not found
43+
fail-on-cache-miss: # optional, default is false
44+
# Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache
45+
lookup-only: # optional, default is false
46+
# Run the post step to save the cache even if another step before fails
47+
save-always: # optional, default is false
48+
- name: Download a Build Artifact
49+
uses: actions/[email protected]
50+
with:
51+
# Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.
52+
name: # optional
53+
# Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE
54+
path: # optional
55+
# A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified.
56+
pattern: # optional
57+
# When multiple artifacts are matched, this changes the behavior of the destination directories. If true, the downloaded artifacts will be in the same directory specified by path. If false, the downloaded artifacts will be extracted into individual named directories within the specified path.
58+
merge-multiple: # optional, default is false
59+
# The GitHub token used to authenticate with the GitHub API. This is required when downloading artifacts from a different repository or from a different workflow run. If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.
60+
github-token: # optional
61+
# The repository owner and the repository name joined together by "/". If github-token is specified, this is the repository that artifacts will be downloaded from.
62+
repository: # optional, default is ${{ github.repository }}
63+
# The id of the workflow run where the desired download artifact was uploaded from. If github-token is specified, this is the run that artifacts will be downloaded from.
64+
run-id: # optional, default is ${{ github.run_id }}
65+
- name: First interaction
66+
uses: actions/[email protected]
67+
with:
68+
# Token for the repository. Can be passed in using {{ secrets.GITHUB_TOKEN }}
69+
repo-token:
70+
# Comment to post on an individual's first issue
71+
issue-message: # optional
72+
# Comment to post on an individual's first pull request
73+
pr-message: # optional
74+

0 commit comments

Comments
 (0)