Skip to content

Commit 77b0040

Browse files
Add cache input to leverage Github Actions cache for v2 (#73)
* added cache-save and updated build. TODO: cache-restore * added cache restore * fixing release type conversion and bool type conversion * add unit tests * fixing path and cache hit issues * add architecture to cache key and fix description * addressed review feedback * updated MatlabPath state 'type' * updated missed copyrights * changing back latest URL * update cache input description
1 parent a01189a commit 77b0040

19 files changed

+2446
-491
lines changed

.eslintrc.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es2021": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"overrides": [
11+
{
12+
"env": {
13+
"node": true
14+
},
15+
"files": [
16+
".eslintrc.{js,cjs}"
17+
],
18+
"parserOptions": {
19+
"sourceType": "script"
20+
}
21+
},
22+
{
23+
"files": [
24+
"**/*.ts"
25+
],
26+
"rules": {
27+
"prefer-const": "off"
28+
}
29+
}
30+
],
31+
"parser": "@typescript-eslint/parser",
32+
"parserOptions": {
33+
"ecmaVersion": "latest",
34+
"sourceType": "module"
35+
},
36+
"plugins": [
37+
"@typescript-eslint"
38+
],
39+
"rules": {
40+
}
41+
}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ jobs:
5353
majorVersion=$(echo ${longVersion%.*.*})
5454
minorVersion=$(echo ${longVersion%.*})
5555
56-
# Add the built artifacts. Using --force because dist/lib should be in
56+
# Add the built artifacts. Using --force because dist should be in
5757
# .gitignore
58-
git add --force dist lib
58+
git add --force dist
5959
6060
# Make the commit
6161
MESSAGE="Build for $(git rev-parse --short HEAD)"

action.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020-2022 The MathWorks, Inc.
1+
# Copyright 2020-2023 The MathWorks, Inc.
22

33
name: Setup MATLAB
44
description: >-
@@ -16,10 +16,17 @@ inputs:
1616
default: |
1717
MATLAB
1818
Parallel_Computing_Toolbox
19+
cache:
20+
description: >-
21+
Option to store MATLAB in the GitHub Actions cache, specified as false or true
22+
required: false
23+
default: false
1924
outputs:
2025
matlabroot:
2126
description: >-
22-
A full path to the folder where MATLAB is installed.
27+
A full path to the folder where MATLAB is installed
2328
runs:
2429
using: node16
25-
main: dist/index.js
30+
main: dist/setup/index.js
31+
post: dist/cache-save/index.js
32+
post-if: success()

0 commit comments

Comments
 (0)