mirror of
https://github.com/Borales/actions-yarn.git
synced 2026-03-03 23:02:17 +08:00
Compare commits
594 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1be4666c97 | ||
|
|
9e568ab9be | ||
|
|
047f93273e | ||
|
|
c657ba1a03 | ||
|
|
83f6fa8b41 | ||
|
|
e7949aaf33 | ||
|
|
09eb7c5a38 | ||
|
|
144d294199 | ||
|
|
972a7c1f85 | ||
|
|
312c58484d | ||
|
|
f95e9eb466 | ||
|
|
1cf6c9c742 | ||
|
|
78ad3cdabf | ||
|
|
a00d5858f0 | ||
|
|
4046b10232 | ||
|
|
f46b5a2477 | ||
|
|
9f163e82f5 | ||
|
|
f33b2ebba1 | ||
|
|
a5749d67c0 | ||
|
|
cdded974cd | ||
|
|
c707acf7a7 | ||
|
|
2a82a56192 | ||
|
|
ce10d15f0c | ||
|
|
6cc6edd40a | ||
|
|
284e854921 | ||
|
|
307a791529 | ||
|
|
cd976ce69e | ||
|
|
1ef77cbfc3 | ||
|
|
9d472e72ca | ||
|
|
4edb2f3d7d | ||
|
|
232196f5fa | ||
|
|
564ed57c10 | ||
|
|
0fdf1be2bc | ||
|
|
5de7c3fab7 | ||
|
|
c87d79b3e2 | ||
|
|
7782e93b40 | ||
|
|
ee34564a96 | ||
|
|
159cfe9cc8 | ||
|
|
de82223c71 | ||
|
|
47519e3cd2 | ||
|
|
295cd30b5e | ||
|
|
a4e0b26bff | ||
|
|
e9a70be5c4 | ||
|
|
3b1941f13a | ||
|
|
740980ea18 | ||
|
|
cdeb70e99f | ||
|
|
b984bd5152 | ||
|
|
5867c8e6d7 | ||
|
|
c5c5a18007 | ||
|
|
5002eab6bd | ||
|
|
1d86720abd | ||
|
|
3e2d361bcd | ||
|
|
f3b5530177 | ||
|
|
1683efc112 | ||
|
|
8bfe32911d | ||
|
|
b3910ed069 | ||
|
|
fcbc9fedf1 | ||
|
|
d233ccc71d | ||
|
|
38b69eddd2 | ||
|
|
5091da4b62 | ||
|
|
76603c3723 | ||
|
|
8cda0ceca0 | ||
|
|
d9b3eb0800 | ||
|
|
7af04bf3e0 | ||
|
|
8b45aa686d | ||
|
|
4860c292fd | ||
|
|
d35e8c436e | ||
|
|
9745600817 | ||
|
|
51faad52a9 | ||
|
|
6f886edad4 | ||
|
|
41a79e0ab1 | ||
|
|
3827fafbf9 | ||
|
|
4c806662b8 | ||
|
|
097bc8c243 | ||
|
|
3796a19378 | ||
|
|
0bc3404e4b | ||
|
|
d549e4285c | ||
|
|
e27dc14ced | ||
|
|
b16a5b72f3 | ||
|
|
f5e6ad568a | ||
|
|
5a78b0e07c | ||
|
|
1245558b3b | ||
|
|
75a4de50e5 | ||
|
|
9cae6e6955 | ||
|
|
f6efd6dc7e | ||
|
|
e090e6360e | ||
|
|
7860d3e893 | ||
|
|
726692d6eb | ||
|
|
c75444e8f8 | ||
|
|
93e6540f12 | ||
|
|
0a874c36ae | ||
|
|
2965735272 | ||
|
|
906de75e39 | ||
|
|
db55c681ef | ||
|
|
fceb1b2a2a | ||
|
|
7187350095 | ||
|
|
74cb894631 | ||
|
|
8ad2fe9448 | ||
|
|
53d799832e | ||
|
|
e8a913cf76 | ||
|
|
7a4508059a | ||
|
|
d7062f10a0 | ||
|
|
7116028ae0 | ||
|
|
d770ca8490 | ||
|
|
193a88a585 | ||
|
|
91255aae76 | ||
|
|
7a9f3673b5 | ||
|
|
5188d1f738 | ||
|
|
e87ca0cee9 | ||
|
|
90629becd9 | ||
|
|
f251ed89b1 | ||
|
|
c1ff708cdd | ||
|
|
dd79529475 | ||
|
|
5685a1615d | ||
|
|
c77a3479c6 | ||
|
|
db07875786 | ||
|
|
e803f5a822 | ||
|
|
46359085df | ||
|
|
f7ae585c67 | ||
|
|
00f8b1477e | ||
|
|
14557bf85a | ||
|
|
ab70f2d9bb | ||
|
|
c3349eea76 | ||
|
|
3f52b191e7 | ||
|
|
20d2020213 | ||
|
|
899a4a3a0d | ||
|
|
55ea902332 | ||
|
|
9d336838af | ||
|
|
2001ab70b7 | ||
|
|
a730a2c22d | ||
|
|
da65e574c1 | ||
|
|
b8415f8ac1 | ||
|
|
a51ce2d132 | ||
|
|
fc1c623846 | ||
|
|
b4faa4ac99 | ||
|
|
3b05c69825 | ||
|
|
5177e343fe | ||
|
|
449ca5816d | ||
|
|
6cccd0528c | ||
|
|
c2e02ce8c4 | ||
|
|
ba9501c39e | ||
|
|
d4670a0cd9 | ||
|
|
178c62f1fe | ||
|
|
6f09301d52 | ||
|
|
e363236a4d | ||
|
|
8ca15f9e38 | ||
|
|
4c4b98ccd5 | ||
|
|
84eee0e4cd | ||
|
|
ee89d4893b | ||
|
|
492e981d4f | ||
|
|
2868a4f0a9 | ||
|
|
c4f2c921bd | ||
|
|
2f14a18611 | ||
|
|
cbd8bae365 | ||
|
|
a620fbf8bc | ||
|
|
a90c6eec0a | ||
|
|
76c524298f | ||
|
|
520584964a | ||
|
|
24c7c77062 | ||
|
|
b8eddf8d79 | ||
|
|
7a23b8f55d | ||
|
|
fa08c0f9f2 | ||
|
|
5381ae3f75 | ||
|
|
539c75432f | ||
|
|
c0707f4443 | ||
|
|
3766bb1335 | ||
|
|
faecda506a | ||
|
|
d331fa9c2e | ||
|
|
1bbc10b5a6 | ||
|
|
fc414c44ad | ||
|
|
63d3868d34 | ||
|
|
8b973a7158 | ||
|
|
c6b32a6ff6 | ||
|
|
4409de64aa | ||
|
|
ddce652109 | ||
|
|
707fb6e3f4 | ||
|
|
6487438ce1 | ||
|
|
427ce64b02 | ||
|
|
8e6586017a | ||
|
|
295cca5788 | ||
|
|
c3b7647095 | ||
|
|
b9811de9ce | ||
|
|
c9bf90fa3a | ||
|
|
efeb26cdd5 | ||
|
|
f023bfc112 | ||
|
|
bab69b2852 | ||
|
|
b7c47ad0bb | ||
|
|
1395419aab | ||
|
|
3040e609fa | ||
|
|
0645e4abeb | ||
|
|
d7c049893c | ||
|
|
8adfb2628f | ||
|
|
b739ad3081 | ||
|
|
99c6504cc1 | ||
|
|
ba04318713 | ||
|
|
0d8fe0c22b | ||
|
|
9853bfc3e5 | ||
|
|
3274fb193d | ||
|
|
8af0ad1a69 | ||
|
|
31efceb9e9 | ||
|
|
ab05b3425e | ||
|
|
68b824faef | ||
|
|
840fc81780 | ||
|
|
d385f975f0 | ||
|
|
442116e4ab | ||
|
|
2a9440a031 | ||
|
|
9bcc92cac7 | ||
|
|
73f88a1987 | ||
|
|
9fb45632df | ||
|
|
dce706fbb2 | ||
|
|
83dc1aa129 | ||
|
|
ca27fe74ed | ||
|
|
00cf072083 | ||
|
|
77f0002bcd | ||
|
|
b917c519d5 | ||
|
|
49e8accabb | ||
|
|
90b15ebd79 | ||
|
|
29036f1f2e | ||
|
|
22a3c4ba4e | ||
|
|
5cae97c055 | ||
|
|
79156a5745 | ||
|
|
200e96892b | ||
|
|
3b4781c3a4 | ||
|
|
e4680437db | ||
|
|
a92cd1003d | ||
|
|
f91b632782 | ||
|
|
8a3711523f | ||
|
|
a004338e20 | ||
|
|
2c86fe3c85 | ||
|
|
c81c91d2a0 | ||
|
|
95230c303c | ||
|
|
7a57ed7021 | ||
|
|
378e2bc53e | ||
|
|
a9ffbc6c81 | ||
|
|
1d6a3c6ece | ||
|
|
1191d9b324 | ||
|
|
4a58126566 | ||
|
|
43b9723cd4 | ||
|
|
6dffffcc20 | ||
|
|
5aa849e48d | ||
|
|
52e9efe874 | ||
|
|
ad4db8e394 | ||
|
|
672f75d791 | ||
|
|
da945ed34f | ||
|
|
7b93e9f839 | ||
|
|
1b314fa462 | ||
|
|
6a98a3dd7b | ||
|
|
f232aa98a3 | ||
|
|
0b3f8008e9 | ||
|
|
19b100c30a | ||
|
|
ac3426f687 | ||
|
|
7845ba0e11 | ||
|
|
94196dc437 | ||
|
|
29b9b89ca7 | ||
|
|
63b2a62298 | ||
|
|
718efb93f7 | ||
|
|
c18a189926 | ||
|
|
914dc914b9 | ||
|
|
7d4d72a9c5 | ||
|
|
38f1d9942c | ||
|
|
e8f2af2c5d | ||
|
|
3df62277ee | ||
|
|
99ea9e0457 | ||
|
|
74a137fccb | ||
|
|
104d970a24 | ||
|
|
4c0a125c37 | ||
|
|
c90f8b4000 | ||
|
|
c5ef563248 | ||
|
|
6d78a9ac7e | ||
|
|
33edd9163c | ||
|
|
efc7ee464b | ||
|
|
76817d7494 | ||
|
|
f40aa07ca3 | ||
|
|
1ecb5fd302 | ||
|
|
d5d4a0dec3 | ||
|
|
4a0855118b | ||
|
|
e294b69b25 | ||
|
|
d0fa461de7 | ||
|
|
ac2aea07a6 | ||
|
|
76f967ee69 | ||
|
|
9b6d91f137 | ||
|
|
2e7e1a7e23 | ||
|
|
c7c402843e | ||
|
|
dd02a67c54 | ||
|
|
66607859b9 | ||
|
|
9c6f029722 | ||
|
|
dde603b31d | ||
|
|
c1066106c0 | ||
|
|
4f939f2edb | ||
|
|
2caa2f5ff8 | ||
|
|
fd9d464350 | ||
|
|
a8a85c4e7a | ||
|
|
e0eecc98e7 | ||
|
|
6966adba7b | ||
|
|
3b8e77f5ca | ||
|
|
0571642958 | ||
|
|
902237bab5 | ||
|
|
a0a7a6bac9 | ||
|
|
f71f06becf | ||
|
|
327617430b | ||
|
|
563efe1b57 | ||
|
|
38983e5b2e | ||
|
|
a70a6ea80f | ||
|
|
3201e5a9ce | ||
|
|
b6475c305d | ||
|
|
d142258bc4 | ||
|
|
aefbeddbca | ||
|
|
ec47e2e9d3 | ||
|
|
8894aa8f91 | ||
|
|
5e6abf7421 | ||
|
|
692f9768a0 | ||
|
|
956da5f64a | ||
|
|
e86d8a790b | ||
|
|
a12ef61504 | ||
|
|
cbce86ddcc | ||
|
|
4a29158a1f | ||
|
|
79d1d41ae7 | ||
|
|
4e12c4b757 | ||
|
|
2ff2af6030 | ||
|
|
320643cfca | ||
|
|
c09c46ba03 | ||
|
|
84570cd71f | ||
|
|
2198a6042c | ||
|
|
556b3140ab | ||
|
|
8003e88ac3 | ||
|
|
fd2eea86d9 | ||
|
|
529212a8dc | ||
|
|
3c30d8e29e | ||
|
|
073245c5fa | ||
|
|
0f5882cd72 | ||
|
|
4b27e7dec9 | ||
|
|
b3c438497d | ||
|
|
278efa59ef | ||
|
|
977e1521ae | ||
|
|
8e005ed3e4 | ||
|
|
18b1b89898 | ||
|
|
0918d223be | ||
|
|
d492966f87 | ||
|
|
31d1d5b09d | ||
|
|
d57c177ed8 | ||
|
|
b6640a847a | ||
|
|
694bae218f | ||
|
|
b249b12356 | ||
|
|
56f787418b | ||
|
|
de564463d9 | ||
|
|
962bfcb6c4 | ||
|
|
e38028f485 | ||
|
|
e14170720c | ||
|
|
2ccf4ed387 | ||
|
|
c6f19323a5 | ||
|
|
621138a3e3 | ||
|
|
cbc4a7fa1c | ||
|
|
61ff2d579f | ||
|
|
dac4067e57 | ||
|
|
4d7c6e5ded | ||
|
|
1827c0f74b | ||
|
|
35c544572f | ||
|
|
e764b39183 | ||
|
|
894b29525a | ||
|
|
38166f9e5e | ||
|
|
2a0dafeeac | ||
|
|
e6830503b8 | ||
|
|
46a9f103bd | ||
|
|
b9a1047145 | ||
|
|
c1fb369259 | ||
|
|
a292d8b3a7 | ||
|
|
2111d603b2 | ||
|
|
958f1b4c34 | ||
|
|
800f8fdcc1 | ||
|
|
6b77643ff6 | ||
|
|
f27d79b1f0 | ||
|
|
3b43067d2d | ||
|
|
cec72e20c1 | ||
|
|
07189d3b03 | ||
|
|
01ed26b2ba | ||
|
|
0fd55cce10 | ||
|
|
d4aaddb6df | ||
|
|
87e46c2e24 | ||
|
|
f4c028f9ee | ||
|
|
fee138c834 | ||
|
|
2cbb746488 | ||
|
|
8d25cc014a | ||
|
|
3fe7e73952 | ||
|
|
9b638ee9e4 | ||
|
|
746dbc6086 | ||
|
|
022d0f6490 | ||
|
|
50f715fe2f | ||
|
|
4456aa6143 | ||
|
|
e0aba9225b | ||
|
|
7910697d90 | ||
|
|
238ce18b97 | ||
|
|
6ccb9261b2 | ||
|
|
e69cedaf3d | ||
|
|
c7a2c75fbe | ||
|
|
9d92cc1445 | ||
|
|
68013b5f76 | ||
|
|
9ff3eb4477 | ||
|
|
ca34f4778b | ||
|
|
3c1ccaa563 | ||
|
|
7858686081 | ||
|
|
e3790a19cd | ||
|
|
c53ed58506 | ||
|
|
d75562382f | ||
|
|
8034f3ae97 | ||
|
|
29938bd298 | ||
|
|
f10f4a732c | ||
|
|
ef0318c1e9 | ||
|
|
c71c83c4c8 | ||
|
|
5fd1324c61 | ||
|
|
71e1a82bab | ||
|
|
ddd47ead40 | ||
|
|
c6062c683f | ||
|
|
16afe60722 | ||
|
|
42fedb7e6c | ||
|
|
69574201a5 | ||
|
|
513afc3d3c | ||
|
|
9733cebcf7 | ||
|
|
7ac317d4c5 | ||
|
|
ec9f35e3bf | ||
|
|
8993aaf190 | ||
|
|
a7fcc53c02 | ||
|
|
603cae9de2 | ||
|
|
c2c61380e0 | ||
|
|
0a27a8d39a | ||
|
|
fb56911a15 | ||
|
|
f90b2c0b1a | ||
|
|
04b5190a76 | ||
|
|
cb2a38747c | ||
|
|
260113a0d2 | ||
|
|
1706898e71 | ||
|
|
53208599a5 | ||
|
|
3ff42f849e | ||
|
|
0916920fea | ||
|
|
6433a2c3e6 | ||
|
|
d9aff06871 | ||
|
|
9624c7ed8f | ||
|
|
6691ee905d | ||
|
|
4b3415f39b | ||
|
|
fea181acaa | ||
|
|
97646b6c46 | ||
|
|
3b5d37ac53 | ||
|
|
54e0c70543 | ||
|
|
16c94da5c1 | ||
|
|
f0744b1b84 | ||
|
|
c40a940add | ||
|
|
34d85a2dfe | ||
|
|
c6630b5ce4 | ||
|
|
34871f1ee6 | ||
|
|
8ba275be47 | ||
|
|
bb80d98b8b | ||
|
|
193d1c42ac | ||
|
|
99be449dac | ||
|
|
218c35ca29 | ||
|
|
3f72735fe6 | ||
|
|
f3a0749aa6 | ||
|
|
f73ab9df9d | ||
|
|
1bbb20eee1 | ||
|
|
6fc6c3666d | ||
|
|
9e5f069677 | ||
|
|
d591e3c049 | ||
|
|
926efbb654 | ||
|
|
1d06d69e1f | ||
|
|
34f1ef1bd5 | ||
|
|
d677a8d911 | ||
|
|
c6164ef5a4 | ||
|
|
b1e4ce424b | ||
|
|
f4fbc70851 | ||
|
|
8b08264142 | ||
|
|
be723317f6 | ||
|
|
e915758dbd | ||
|
|
b854bfb0d8 | ||
|
|
f7160ee49a | ||
|
|
bf8c7d6340 | ||
|
|
08411a890a | ||
|
|
c6942a99f8 | ||
|
|
b2026bd422 | ||
|
|
5de75ccdd1 | ||
|
|
88ecdb0d3c | ||
|
|
a61398574a | ||
|
|
9f1628b7a6 | ||
|
|
45954e678c | ||
|
|
0a87ba687b | ||
|
|
ea1e7c5230 | ||
|
|
d66f84e169 | ||
|
|
8555b485df | ||
|
|
59e3e558a5 | ||
|
|
c7bd3680cb | ||
|
|
8e8f6b1eb2 | ||
|
|
6820f555c0 | ||
|
|
3530b98ad8 | ||
|
|
d629be3ea0 | ||
|
|
e1bc704a84 | ||
|
|
db27e2339b | ||
|
|
53f897ccaf | ||
|
|
39f840050a | ||
|
|
1f75977d29 | ||
|
|
cf361697fd | ||
|
|
6c0bcbcaad | ||
|
|
f81ea21c79 | ||
|
|
83f8cc541c | ||
|
|
1c99bd65df | ||
|
|
65a490330b | ||
|
|
7cb627d7ed | ||
|
|
ed15d8809b | ||
|
|
0a24d1fad2 | ||
|
|
55ca073f4c | ||
|
|
5c373aaa5c | ||
|
|
3e8f161271 | ||
|
|
069531565d | ||
|
|
452d632cde | ||
|
|
6ef2c43c49 | ||
|
|
ab8b76ed4f | ||
|
|
19a366b7f8 | ||
|
|
c1a2d5b3cd | ||
|
|
50857cb06f | ||
|
|
3fe4d9e231 | ||
|
|
8ca086c476 | ||
|
|
180206fc8b | ||
|
|
6d6b09d898 | ||
|
|
778d3d8b05 | ||
|
|
aa1d957fdd | ||
|
|
c3a133b56a | ||
|
|
63f1fcf2aa | ||
|
|
5f7557f715 | ||
|
|
7e6f3ef235 | ||
|
|
7381196c4c | ||
|
|
e643ac26f5 | ||
|
|
8aa65a7bdf | ||
|
|
6a23fcfb75 | ||
|
|
d62689e1f9 | ||
|
|
16d9240525 | ||
|
|
9ef6c1f83b | ||
|
|
bdabd7531d | ||
|
|
85bb3c6650 | ||
|
|
2b82425e69 | ||
|
|
1bea398627 | ||
|
|
fdef96617e | ||
|
|
5ee6f31726 | ||
|
|
588a5ae9a0 | ||
|
|
e13cc552c7 | ||
|
|
49647aab6a | ||
|
|
7bcb5309df | ||
|
|
e7e06ab92c | ||
|
|
6446bdba7c | ||
|
|
a91b00b2ef | ||
|
|
616797d406 | ||
|
|
d84209f2e6 | ||
|
|
d00d0491a4 | ||
|
|
a5b6fc5ff9 | ||
|
|
5dc0f9d1ee | ||
|
|
0df7dfb76f | ||
|
|
736dded4c7 | ||
|
|
65d6ff917a | ||
|
|
9e2b8318aa | ||
|
|
18342e3784 | ||
|
|
0fef9c9cb4 | ||
|
|
36db23d1c1 | ||
|
|
7b41b68187 | ||
|
|
bc5bc8c00d | ||
|
|
5b0fd1b356 | ||
|
|
ea928198c6 | ||
|
|
adffcf1a4c | ||
|
|
c0bd87bb8f | ||
|
|
336129caf7 | ||
|
|
972a24df0e | ||
|
|
d306662790 | ||
|
|
b8595f4a11 | ||
|
|
ac4557836a | ||
|
|
1e254dbd30 | ||
|
|
0f90e8521a | ||
|
|
1acdbcd2de | ||
|
|
0cc313ad9b | ||
|
|
97ba8bebfe | ||
|
|
d8b5ea8c26 | ||
|
|
ac4aa8b421 | ||
|
|
d0b398ccef | ||
|
|
32394b360b | ||
|
|
b257940aaa | ||
|
|
062383b267 | ||
|
|
d236877258 | ||
|
|
21a4e475d0 | ||
|
|
16098ef84e | ||
|
|
9e77a0618b | ||
|
|
17af3bf048 | ||
|
|
5841a21eef | ||
|
|
4c27ffd69f | ||
|
|
0790298b9b | ||
|
|
d2ca561aa5 | ||
|
|
37ae1f22f9 | ||
|
|
9b8f6b01d0 | ||
|
|
6bc995441e | ||
|
|
fdf0082f89 | ||
|
|
1937fedd35 | ||
|
|
9bec063cfa |
@ -1,7 +0,0 @@
|
||||
# ignore all files by default
|
||||
*
|
||||
# include required files with an exception
|
||||
!entrypoint.sh
|
||||
!LICENSE
|
||||
!README.md
|
||||
!THIRD_PARTY_NOTICE.md
|
||||
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@ -0,0 +1,4 @@
|
||||
dist/
|
||||
lib/
|
||||
node_modules/
|
||||
jest.config.js
|
||||
61
.eslintrc.json
Normal file
61
.eslintrc.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"plugins": ["jest", "@typescript-eslint"],
|
||||
"extends": ["plugin:github/recommended"],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 9,
|
||||
"sourceType": "module",
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"rules": {
|
||||
"i18n-text/no-en": "off",
|
||||
"eslint-comments/no-use": "off",
|
||||
"import/no-namespace": "off",
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "error",
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"error",
|
||||
{ "accessibility": "no-public" }
|
||||
],
|
||||
"@typescript-eslint/no-require-imports": "error",
|
||||
"@typescript-eslint/array-type": "error",
|
||||
"@typescript-eslint/await-thenable": "error",
|
||||
"@typescript-eslint/ban-ts-comment": "error",
|
||||
"camelcase": "off",
|
||||
"@typescript-eslint/consistent-type-assertions": "error",
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{ "allowExpressions": true }
|
||||
],
|
||||
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
||||
"@typescript-eslint/no-array-constructor": "error",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
"@typescript-eslint/no-extraneous-class": "error",
|
||||
"@typescript-eslint/no-for-in-array": "error",
|
||||
"@typescript-eslint/no-inferrable-types": "error",
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||
"@typescript-eslint/no-useless-constructor": "error",
|
||||
"@typescript-eslint/no-var-requires": "error",
|
||||
"@typescript-eslint/prefer-for-of": "warn",
|
||||
"@typescript-eslint/prefer-function-type": "warn",
|
||||
"@typescript-eslint/prefer-includes": "error",
|
||||
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
||||
"@typescript-eslint/promise-function-async": "error",
|
||||
"@typescript-eslint/require-array-sort-compare": "error",
|
||||
"@typescript-eslint/restrict-plus-operands": "error",
|
||||
"semi": "off",
|
||||
"@typescript-eslint/semi": ["error", "never"],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unbound-method": "error"
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"jest/globals": true
|
||||
}
|
||||
}
|
||||
10
.github/renovate.json
vendored
Normal file
10
.github/renovate.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["github>Borales/renovate-config"],
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "GitHub Actions Toolkit",
|
||||
"matchSourceUrls": ["https://github.com/actions/toolkit{/,}**"]
|
||||
}
|
||||
]
|
||||
}
|
||||
47
.github/workflows/check-dist.yml
vendored
Normal file
47
.github/workflows/check-dist.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
# https://github.com/actions/typescript-action/blob/main/.github/workflows/check-dist.yml
|
||||
name: Check dist/
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
check-dist:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set Node.js 20
|
||||
uses: actions/setup-node@v4.4.0
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn
|
||||
|
||||
- name: Rebuild the dist/ directory
|
||||
run: |
|
||||
yarn build
|
||||
yarn package
|
||||
- name: Compare the expected and actual dist/ directories
|
||||
run: |
|
||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||
echo "Detected uncommitted changes after build. See status below:"
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
id: diff
|
||||
|
||||
# If index.js was different than expected, upload the expected version as an artifact
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
21
.github/workflows/docker-publish.yml
vendored
21
.github/workflows/docker-publish.yml
vendored
@ -1,21 +0,0 @@
|
||||
name: Publish Docker image
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: borales/yarn
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
cache: true
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
lib
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@ -0,0 +1,3 @@
|
||||
dist/
|
||||
lib/
|
||||
node_modules/
|
||||
10
.prettierrc.json
Normal file
10
.prettierrc.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"semi": false,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": false,
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
20
CHANGELOG.md
20
CHANGELOG.md
@ -1,5 +1,25 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 5.0.0 (3 Feb 2024)
|
||||
|
||||
- Switching to `node20`
|
||||
|
||||
## 4.2.0 (5 Dec 2022)
|
||||
|
||||
- Added proper support for multiple arguments
|
||||
|
||||
## 4.1.0 (26 Nov 2022)
|
||||
|
||||
- Added `dir` option
|
||||
|
||||
## 4.0.0 (26 Nov 2022)
|
||||
|
||||
- Migrated to Actions toolkit
|
||||
|
||||
## 3.0.0 (8 Jun 2022)
|
||||
|
||||
- Migrating to Python3
|
||||
|
||||
## 2.1.0 (8 Nov 2019)
|
||||
|
||||
- Switching to `node:lts` docker image
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
FROM node:lts-alpine
|
||||
|
||||
RUN apk add --no-cache git python3 build-base
|
||||
RUN npm i -g --force yarn
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["help"]
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Oleksandr Bordun
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
57
README.md
57
README.md
@ -1,54 +1,57 @@
|
||||
# GitHub Actions for Yarn
|
||||
|
||||
This GitHub Action is currently compatible with Yarn 1.x only.
|
||||
|
||||
> Look [github.com/actions/setup-node](https://github.com/actions/setup-node) for more details.
|
||||
|
||||
This Action for [yarn](https://yarnpkg.com) enables arbitrary actions with the `yarn` command-line client, including testing packages and publishing to a registry.
|
||||
|
||||
> **Please keep in mind** that this Action was originally written for GitHub Actions beta (when Docker was the only way of doing things).
|
||||
Consider using [actions/setup-node](https://github.com/actions/setup-node) to work with Yarn. This repository will be mostly supporting the existing flows.
|
||||
|
||||
## Usage
|
||||
|
||||
> It is required to run `actions/setup-node@v3` before `borales/actions-yarn` in order to setup the desired node version.
|
||||
|
||||
An example workflow how to install packages via Yarn (using repository syntax):
|
||||
|
||||
```yml
|
||||
name: CI
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: borales/actions-yarn@v2.3.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set Node.js 16.x
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Run install
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: install # will run `yarn install` command
|
||||
- uses: borales/actions-yarn@v2.3.0
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # if needed
|
||||
- name: Build production bundle
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: build # will run `yarn build` command
|
||||
- uses: borales/actions-yarn@v2.3.0
|
||||
cmd: build:prod # will run `yarn build:prod` command
|
||||
- name: Test the app
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: test # will run `yarn test` command
|
||||
|
||||
- name: Run test in sub-folder
|
||||
uses: borales/actions-yarn@v4
|
||||
with:
|
||||
cmd: test
|
||||
dir: 'frontend' # will run `yarn test` in `frontend` sub folder
|
||||
```
|
||||
|
||||
> `cmd` value will be used as a command for Yarn
|
||||
>
|
||||
> `dir` value will be used for Yarn `cwd`
|
||||
|
||||
### Secrets
|
||||
|
||||
* `NPM_AUTH_TOKEN` - **Optional**. The token to use for authentication with the npm registry. Required for `yarn publish` ([more info](https://docs.npmjs.com/getting-started/working_with_tokens))
|
||||
|
||||
### Environment variables
|
||||
|
||||
* `NPM_REGISTRY_URL` - **Optional**. To specify a registry to authenticate with. Defaults to `registry.npmjs.org`
|
||||
* `NPM_CONFIG_USERCONFIG` - **Optional**. To specify a non-default per-user configuration file. Defaults to `$HOME/.npmrc` ([more info](https://docs.npmjs.com/misc/config#npmrc-files))
|
||||
|
||||
#### Example
|
||||
|
||||
To authenticate with, and publish to, a registry other than `registry.npmjs.org`:
|
||||
|
||||
```yml
|
||||
- uses: borales/actions-yarn@v2.3.0
|
||||
with:
|
||||
auth-token: ${{ secrets.NPM_TOKEN }}
|
||||
registry-url: someOtherRegistry.someDomain.net
|
||||
```
|
||||
More information about [private registry setup](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages).
|
||||
|
||||
18
action.yml
18
action.yml
@ -1,5 +1,6 @@
|
||||
name: 'GitHub Action for Yarn'
|
||||
description: 'Wraps the yarn CLI to enable common yarn commands'
|
||||
author: 'Alex Bordun'
|
||||
branding:
|
||||
icon: 'package'
|
||||
color: 'blue'
|
||||
@ -7,15 +8,10 @@ inputs:
|
||||
cmd:
|
||||
description: 'Yarn command'
|
||||
required: true
|
||||
auth-token:
|
||||
description: 'NPM_AUTH_TOKEN'
|
||||
registry-url:
|
||||
description: 'NPM_REGISTRY_URL'
|
||||
dir:
|
||||
description: 'Yarn sub-folder (if needed)'
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.cmd }}
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{ inputs.auth-token }}
|
||||
NPM_REGISTRY_URL: ${{ inputs.registry-url }}
|
||||
using: 'node20'
|
||||
main: 'dist/index.js'
|
||||
|
||||
3658
dist/index.js
vendored
Normal file
3658
dist/index.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
dist/index.js.map
vendored
Normal file
1
dist/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
84
dist/licenses.txt
vendored
Normal file
84
dist/licenses.txt
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
@actions/core
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/exec
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@actions/http-client
|
||||
MIT
|
||||
Actions Http Client for Node.js
|
||||
|
||||
Copyright (c) GitHub, Inc.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
@actions/io
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright 2019 GitHub
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
tunnel
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012 Koichi Kobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
1
dist/sourcemap-register.js
vendored
Normal file
1
dist/sourcemap-register.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,22 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -n "$NPM_AUTH_TOKEN" ]; then
|
||||
# Respect NPM_CONFIG_USERCONFIG if it is provided, default to $HOME/.npmrc
|
||||
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-"$HOME/.npmrc"}"
|
||||
NPM_REGISTRY_URL="${NPM_REGISTRY_URL:-registry.npmjs.org}"
|
||||
NPM_STRICT_SSL="${NPM_STRICT_SSL:-true}"
|
||||
NPM_REGISTRY_SCHEME="https"
|
||||
if ! $NPM_STRICT_SSL
|
||||
then
|
||||
NPM_REGISTRY_SCHEME="http"
|
||||
fi
|
||||
|
||||
# Allow registry.npmjs.org to be overridden with an environment variable
|
||||
printf "//%s/:_authToken=%s\\nregistry=%s\\nstrict-ssl=%s" "$NPM_REGISTRY_URL" "$NPM_AUTH_TOKEN" "${NPM_REGISTRY_SCHEME}://$NPM_REGISTRY_URL" "${NPM_STRICT_SSL}" > "$NPM_CONFIG_USERCONFIG"
|
||||
|
||||
chmod 0600 "$NPM_CONFIG_USERCONFIG"
|
||||
fi
|
||||
|
||||
sh -c "yarn $*"
|
||||
30
package.json
Normal file
30
package.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@borales/actions-yarn",
|
||||
"version": "4.2.0",
|
||||
"main": "lib/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"format": "prettier --write '**/*.ts'",
|
||||
"format-check": "prettier --check '**/*.ts'",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"package": "ncc build --source-map --license licenses.txt",
|
||||
"test": "jest",
|
||||
"all": "yarn build && yarn format && yarn lint && yarn package && yarn test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^20.19.34",
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@vercel/ncc": "^0.38.4",
|
||||
"eslint-plugin-github": "^4.10.2",
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"eslint": "^8.57.1",
|
||||
"jest": "^29.7.0",
|
||||
"prettier": "^3.8.1",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
22
src/index.ts
Normal file
22
src/index.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import {debug, getInput, setFailed, getState} from '@actions/core'
|
||||
import {ensureYarnIsInstalled} from './yarn'
|
||||
import {run} from './run'
|
||||
import {resolve} from 'path'
|
||||
|
||||
const main = async (): Promise<void> => {
|
||||
await ensureYarnIsInstalled()
|
||||
|
||||
const cmd: string = getInput('cmd', {required: true})
|
||||
const dir: string = getInput('dir')
|
||||
const cwd: string = resolve(getState('repositoryPath'), dir || '')
|
||||
|
||||
try {
|
||||
debug(`Running "${cmd}" command`)
|
||||
|
||||
await run(cmd, {cwd})
|
||||
} catch (error) {
|
||||
if (error instanceof Error) setFailed(error.message)
|
||||
}
|
||||
}
|
||||
|
||||
main()
|
||||
5
src/run.ts
Normal file
5
src/run.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import {exec} from '@actions/exec'
|
||||
|
||||
export const run = async (cmd: string, {cwd}: {cwd: string}): Promise<void> => {
|
||||
await exec('yarn', cmd.split(' '), {cwd})
|
||||
}
|
||||
20
src/yarn.ts
Normal file
20
src/yarn.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import {debug, setOutput} from '@actions/core'
|
||||
import {exec, getExecOutput} from '@actions/exec'
|
||||
import {which} from '@actions/io'
|
||||
|
||||
export const ensureYarnIsInstalled = async (): Promise<void> => {
|
||||
try {
|
||||
await which('yarn', true)
|
||||
} catch (e) {
|
||||
await exec('npm install --global yarn')
|
||||
}
|
||||
|
||||
const [{stdout: yarnVersion}, {stdout: nodeVersion}] = await Promise.all([
|
||||
getExecOutput('yarn', ['--version'], {silent: true}),
|
||||
getExecOutput('node', ['--version'], {silent: true})
|
||||
])
|
||||
debug(`Node ${nodeVersion.trim()} detected`)
|
||||
debug(`Yarn v${yarnVersion.trim()} detected`)
|
||||
|
||||
setOutput('yarn-version', yarnVersion.trim())
|
||||
}
|
||||
12
tsconfig.json
Normal file
12
tsconfig.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"outDir": "./lib" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user