@orangebeard-io/playwright-orangebeard-reporter 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +5 -0
- package/.eslintrc +22 -0
- package/.github/logo.svg +91 -0
- package/.github/workflows/release.yml +144 -0
- package/.prettierrc +7 -0
- package/LICENSE +661 -0
- package/README.md +90 -0
- package/changelog-template.hbs +29 -0
- package/dist/index.js +4 -0
- package/package.json +47 -0
- package/src/index.ts +3 -0
- package/src/reporter/OrangebeardReporter.ts +265 -0
- package/src/reporter/utils.ts +160 -0
- package/tsconfig.json +20 -0
package/.eslintignore
ADDED
package/.eslintrc
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"parser": "@typescript-eslint/parser",
|
3
|
+
"parserOptions": {
|
4
|
+
"ecmaVersion": 12,
|
5
|
+
"sourceType": "module",
|
6
|
+
"project": "./tsconfig.json"
|
7
|
+
},
|
8
|
+
"plugins": ["@typescript-eslint", "prettier"],
|
9
|
+
"extends": ["airbnb-base", "airbnb-typescript/base", "prettier", "eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
10
|
+
"rules": {
|
11
|
+
"@typescript-eslint/no-unused-vars": "error",
|
12
|
+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
|
13
|
+
"@typescript-eslint/no-explicit-any": "off",
|
14
|
+
"@typescript-eslint/no-namespace": "off",
|
15
|
+
"@typescript-eslint/no-redeclare": "off",
|
16
|
+
"prettier/prettier": 2
|
17
|
+
},
|
18
|
+
"env": {
|
19
|
+
"browser": true,
|
20
|
+
"es2021": true
|
21
|
+
}
|
22
|
+
}
|
package/.github/logo.svg
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<svg
|
3
|
+
id="Layer_1"
|
4
|
+
data-name="Layer 1"
|
5
|
+
viewBox="0 0 121173.61 38793.241"
|
6
|
+
version="1.1"
|
7
|
+
sodipodi:docname="logo.svg"
|
8
|
+
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
|
9
|
+
xml:space="preserve"
|
10
|
+
inkscape:export-filename="..\..\playwright-listener\.github\logo.svg"
|
11
|
+
inkscape:export-xdpi="96"
|
12
|
+
inkscape:export-ydpi="96"
|
13
|
+
width="121173.61"
|
14
|
+
height="38793.242"
|
15
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
16
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
17
|
+
xmlns="http://www.w3.org/2000/svg"
|
18
|
+
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
|
19
|
+
id="namedview31"
|
20
|
+
pagecolor="#ffffff"
|
21
|
+
bordercolor="#000000"
|
22
|
+
borderopacity="0.25"
|
23
|
+
inkscape:showpageshadow="2"
|
24
|
+
inkscape:pageopacity="0.0"
|
25
|
+
inkscape:pagecheckerboard="0"
|
26
|
+
inkscape:deskcolor="#d1d1d1"
|
27
|
+
showgrid="false"
|
28
|
+
inkscape:zoom="4.7928512"
|
29
|
+
inkscape:cx="153.77068"
|
30
|
+
inkscape:cy="142.39958"
|
31
|
+
inkscape:window-width="4300"
|
32
|
+
inkscape:window-height="1711"
|
33
|
+
inkscape:window-x="-9"
|
34
|
+
inkscape:window-y="-9"
|
35
|
+
inkscape:window-maximized="1"
|
36
|
+
inkscape:current-layer="Layer_1" /><defs
|
37
|
+
id="defs4"><style
|
38
|
+
id="style2">.cls-1{fill:#99425b;}.cls-2{fill:#fff;}.cls-3{fill:#e9551d;}.cls-4{fill:#ef7c10;}.cls-5{fill:#f6a307;}.cls-6{fill:#b91d1b;}.cls-7{fill:#020203;}</style></defs><path
|
39
|
+
class="cls-3"
|
40
|
+
d="m 132.43,24.97 a 67,67 0 0 1 11.84,37 62.44,62.44 0 0 0 -16.46,-18.52 72.41,72.41 0 0 1 8.56,36.33 32.55,32.55 0 0 0 -13.81,-19.81 c 4.3,10.75 8.43,23.54 2.07,33.22 a 93.11,93.11 0 0 0 -6,-15 81.23,81.23 0 0 1 -10.92,46 59.53,59.53 0 0 0 -8.2,-29.47 126.3,126.3 0 0 1 -5.71,38.43 101.78,101.78 0 0 0 -13.14,-33.15 133.18,133.18 0 0 1 -9.84,28.19 125.09,125.09 0 0 0 -9.87,-28 c -5.64,9.15 -4.66,20.73 -3.44,31.38 A 90.38,90.38 0 0 1 45.87,79.8 34.75,34.75 0 0 0 37.8,97.97 c -7.64,-9.9 -6.49,-23.7 -5,-36.13 A 61.76,61.76 0 0 0 17.02,81.74 C 15.67,64.97 23.87,49.11 31.84,34.26 A 60.08,60.08 0 0 1 14.29,50.39 270.55,270.55 0 0 0 24.79,18.97 23.19,23.19 0 0 1 17.28,29.79 7.66,7.66 0 0 1 16.75,31.86 C 12.16,42.03 0.62,55.48 0,56.66 c 0,0 7.28,-0.82 12.33,-5.51 -7.81,14.92 5.05,42.72 11.21,49.74 -1.18,-3.18 -0.92,-7.67 1.84,-9.67 -1.35,29.05 22.88,46 22.88,46 0,0 -3.32,-6.56 -0.52,-10.25 1.57,8 35.9,19.14 35.9,35.14 0,-16.23 36.92,-28 40.76,-50.29 0.62,0 1.57,6.59 -0.33,9 17.58,-10.33 29.18,-43.12 27.9,-52.6 2.76,3 4.37,9.78 4.37,9.78 0,0 10.59,-24.5 -0.33,-45.12 -4.13,-7.91 -8.07,-11.41 -11.51,-13.91 1.11,5 3.64,9.58 6.13,14.07 a 26.36,26.36 0 0 0 -18.2,-8.07 z"
|
41
|
+
id="path10" /><path
|
42
|
+
class="cls-4"
|
43
|
+
d="M 78.56,21.97 C 40.72,21.05 26.2,9.6 26.2,-0.03 c 0,17.83 -8.23,24 -8.92,29.83 A 23.19,23.19 0 0 0 24.79,18.97 270.55,270.55 0 0 1 14.29,50.35 60.08,60.08 0 0 0 31.84,34.26 C 23.87,49.11 15.67,64.97 17.02,81.74 A 61.35,61.35 0 0 1 32.79,61.87 c -1.48,12.43 -2.59,26.26 5,36.23 a 34.7,34.7 0 0 1 8.15,-18.2 90.45,90.45 0 0 0 11.61,51.84 c -1.18,-10.65 -2.2,-22.23 3.44,-31.38 a 124.08,124.08 0 0 1 9.87,28 133.07,133.07 0 0 0 9.84,-28.2 101.58,101.58 0 0 1 13.15,33.15 126.2,126.2 0 0 0 5.7,-38.43 59.88,59.88 0 0 1 8.2,29.48 81.17,81.17 0 0 0 10.92,-46 94.68,94.68 0 0 1 6,15 c 6.36,-9.7 2.23,-22.49 -2.06,-33.21 a 32.7,32.7 0 0 1 13.79,19.82 72.41,72.41 0 0 0 -8.56,-36.33 62.44,62.44 0 0 1 16.46,18.52 67.06,67.06 0 0 0 -11.83,-37 26.13,26.13 0 0 1 18.19,8.07 c -2.49,-4.49 -5,-9.08 -6.13,-14.07 -5.54,-3.93 -9.93,-5.44 -12.43,-19 -0.03,9.44 -15.67,22.72 -53.54,21.81 z"
|
44
|
+
id="path12" /><path
|
45
|
+
class="cls-5"
|
46
|
+
d="m 57.94,28.19 c -6.69,5.81 -7.93,18.3 -6.65,27 a 21.76,21.76 0 0 1 6.25,-10.6 c -1.67,5 0.17,10.46 2.17,15.38 2.39,5.9 5.08,11.74 9,16.72 a 35.1,35.1 0 0 1 1.37,-20.53 c 0,2.46 1.32,4.73 2.5,6.89 a 119.6,119.6 0 0 1 11.8,31.58 c 5.34,-10.63 3.61,-23.38 7,-34.76 4.85,4.85 6.06,12.13 6.82,18.92 a 49.92,49.92 0 0 0 4.59,-28.53 29,29 0 0 1 7.9,12.71 46.24,46.24 0 0 0 -1,-23.38 c -1.48,-4.75 -4.07,-9.6 -8.63,-11.74 a 18.79,18.79 0 0 0 -5.54,-1.44 c -3.28,-0.46 -6.59,-0.72 -9.9,-1 a 64.1,64.1 0 0 0 -12.23,-0.1 21.75,21.75 0 0 0 -11.25,4.36"
|
47
|
+
id="path14" /><path
|
48
|
+
class="cls-6"
|
49
|
+
d="m 58.94,27.08 c -1.89,16.89 34.34,27.74 43.46,1.44 2.82,-8.13 -43.02,-5.77 -43.46,-1.44 z"
|
50
|
+
id="path16" /><path
|
51
|
+
class="cls-2"
|
52
|
+
d="m 61.74,33.31 c 0,2.66 37.25,1.77 37.18,-0.66 0,-0.52 0.26,-6.13 0.3,-6.75 -10.46,0.56 -28.36,0.29 -37.51,3.08 v 4.33 z"
|
53
|
+
id="path18" /><path
|
54
|
+
class="cls-5"
|
55
|
+
d="m 80.3,20.33 c 6.59,6.85 41.41,8.06 50.3,-2.53 -6.07,5.08 -14.14,4.56 -16.89,3.54 a 7.67,7.67 0 0 0 5.64,-5.9 C 104.17,30.75 99.71,4.49 80.5,18.52 64.63,6.97 54.2,23.34 42.1,17.67 l 5.15,3.67 c 0,0 -7.58,5 -16.89,-3.54 a 21.39,21.39 0 0 0 4.23,4.69 c 12.98,4.48 39.54,2.75 45.71,-2.16 z"
|
56
|
+
id="path20" /><path
|
57
|
+
class="cls-3"
|
58
|
+
d="m 80.5,26.39 c 11.67,6.49 40.42,6.2 50.1,-8.56 v 0 c -8.89,10.56 -43.71,9.35 -50.3,2.5 -6.17,4.91 -32.73,6.64 -45.71,2.16 12.1,10.07 35.61,9.64 45.91,3.9 z"
|
59
|
+
id="path22" /><path
|
60
|
+
class="cls-3"
|
61
|
+
d="m 84.46,156.63 c -6.75,3.77 -15.9,24.2 1.31,40.33 -1.31,-15.15 14.3,-23.81 -1.31,-40.33"
|
62
|
+
id="path24" /><path
|
63
|
+
class="cls-4"
|
64
|
+
d="m 84.07,156.63 c -3.31,3.77 -6.72,24.2 1.74,40.33 -0.66,-15.15 5.9,-23.81 -1.74,-40.33"
|
65
|
+
id="path26" /><path
|
66
|
+
class="cls-7"
|
67
|
+
d="m 64.53,153.38 c 1.34,-2.65 18.72,2.66 18.72,2.66 0,0 15.31,-6.1 18.1,-5.15 2.79,0.95 1.87,15.71 0,15.71 -1.87,0 -18.07,-8.27 -18.07,-8.27 0,0 -15.64,8.5 -17.18,8.27 -1.54,-0.23 -2.36,-11.63 -1.57,-13.22 z"
|
68
|
+
id="path28" /><g
|
69
|
+
id="g7"
|
70
|
+
transform="matrix(0.72207957,0,0,0.76886303,163.1628,22.388349)"><path
|
71
|
+
d="m 84.380258,108.35161 c -9.556409,2.71207 -15.825994,7.46729 -19.95603,12.21879 3.955757,-3.46184 9.254573,-6.63891 16.402227,-8.66499 7.310808,-2.07206 13.547762,-2.05723 18.701222,-1.06273 v -4.02992 c -4.396274,-0.40195 -9.436267,-0.0816 -15.147419,1.53885 z M 63.987419,74.474785 28.496478,83.825026 c 0,0 0.646834,0.913665 1.844537,2.132875 l 30.091859,-7.929313 c 0,0 -0.426427,5.494602 -4.129516,10.410004 7.004745,-5.299557 7.684061,-13.963807 7.684061,-13.963807 z M 93.695643,157.8846 C 43.750467,171.33669 17.3261,113.45538 9.3258895,83.412689 5.6296968,69.545292 4.0161722,59.042587 3.5861115,52.264997 3.5399091,51.561208 3.5612675,50.967919 3.6110297,50.424317 1.020135,50.580797 -0.22028475,51.927564 0.03208571,55.819542 0.46214634,62.593424 2.075671,73.095387 5.7718637,86.967234 13.768515,117.00548 40.196441,174.88679 90.141839,161.43469 c 10.871291,-2.92862 19.038651,-8.26304 25.169561,-15.07252 -5.65108,5.10378 -12.72383,9.12331 -21.615757,11.52243 z M 103.08148,39.05096 v 3.554545 h 19.59042 c -0.40196,-1.258515 -0.80688,-2.392439 -1.20883,-3.554545 z"
|
72
|
+
fill="#2d4552"
|
73
|
+
id="path1" /><path
|
74
|
+
d="m 127.05037,68.325341 c 8.81035,2.502198 13.46989,8.679082 15.93279,14.145502 l 9.82339,2.789943 c 0,0 -1.3401,-19.131357 -18.64486,-24.04676 -16.18865,-4.599476 -26.15072,8.995009 -27.36251,10.754111 4.70923,-3.355051 11.5862,-6.101981 20.25119,-3.642796 z m 78.19628,14.233753 c -16.20347,-4.620241 -26.16184,9.002425 -27.35583,10.737055 4.71294,-3.351344 11.5862,-6.099015 20.24748,-3.628706 8.79626,2.505906 13.4521,8.675373 15.92241,14.145497 l 9.83748,2.80033 c 0,0 -1.3616,-19.135065 -18.65154,-24.054176 z m -9.75961,50.442946 -81.71819,-22.84535 c 0,0 0.88474,4.48527 4.2791,10.29283 l 68.80302,19.23444 c 5.66443,-3.27718 8.63607,-6.68192 8.63607,-6.68192 z m -56.65543,49.17405 C 74.126734,164.82831 81.949255,82.385557 92.419329,43.318935 96.730318,27.219287 101.16219,15.252863 104.83762,7.2313679 102.64467,6.7799488 100.82846,7.9350832 99.033764,11.585074 95.131403,19.49985 90.141098,32.386837 85.311722,50.427284 74.844615,89.493164 67.022094,171.93295 131.72401,189.28073 c 30.4973,8.17033 54.25557,-4.24721 71.966,-23.74863 -16.81086,15.22603 -38.27384,23.76272 -64.8584,16.64399 z"
|
75
|
+
fill="#2d4552"
|
76
|
+
id="path2" /><path
|
77
|
+
d="m 103.08148,138.56487 v -16.63658 l -46.223619,13.10725 c 0,0 3.415567,-19.84553 27.522397,-26.68393 7.310808,-2.07206 13.548504,-2.05797 18.701222,-1.06273 V 39.05096 h 23.14422 c -2.52,-7.786923 -4.95768,-13.782112 -7.00527,-17.947745 -3.38694,-6.894764 -6.85916,-2.324211 -14.74175,4.268717 C 98.926972,30.009972 84.895678,39.904555 63.781251,45.5942 42.666527,51.287553 25.596406,49.777632 18.474115,48.544332 8.3769974,46.802286 3.0956837,44.584867 3.5897454,52.264997 4.0197319,59.038879 5.6333307,69.541584 9.3295234,83.412689 17.3261,113.45167 43.754027,171.33298 93.699351,157.88089 106.74578,154.36565 115.95438,147.41749 122.33743,138.56116 H 103.08148 Z M 28.492993,83.825026 63.987419,74.474785 c 0,0 -1.034548,13.654555 -14.340768,17.162378 -13.309928,3.504116 -21.153658,-7.812137 -21.153658,-7.812137 z"
|
78
|
+
fill="#e2574c"
|
79
|
+
id="path3" /><path
|
80
|
+
d="M 236.66429,39.840035 C 227.4379,41.45749 205.30301,43.472449 177.94792,36.140134 150.58542,28.812269 132.43076,15.996032 125.23787,9.9719198 115.04145,1.4315193 110.55619,-4.5037476 106.14211,4.473833 102.23975,12.392244 97.249446,25.27923 92.419329,43.319677 81.952963,82.385557 74.130442,164.82534 138.83161,182.17312 c 64.68783,17.33295 99.12605,-57.97772 109.59316,-97.047308 4.83012,-18.036738 6.94816,-31.695001 7.53107,-40.50164 0.66448,-9.976161 -6.18801,-7.080167 -19.29155,-4.784137 z M 106.66791,72.160957 c 0,0 10.19642,-15.858625 27.49007,-10.943223 17.30477,4.915403 18.64486,24.04676 18.64486,24.04676 z m 42.21477,71.162833 c -30.41869,-8.91046 -35.11013,-33.1671 -35.11013,-33.1671 l 81.71449,22.84609 c 0,-0.004 -16.49418,19.12023 -46.60436,10.32101 z m 28.89097,-49.849654 c 0,0 10.18232,-15.847501 27.473,-10.918008 17.28994,4.922819 18.65154,24.054172 18.65154,24.054172 z"
|
81
|
+
fill="#2ead33"
|
82
|
+
id="path4" /><path
|
83
|
+
d="m 86.928436,126.50923 -30.070575,8.5226 c 0,0 3.266503,-18.60852 25.418445,-25.98311 L 65.248901,45.147008 63.777543,45.5942 C 42.662968,51.288295 25.592846,49.777632 18.470555,48.544332 8.3735118,46.803027 3.0921981,44.584867 3.5861857,52.265739 4.0162463,59.03962 5.6297709,69.541584 9.3259637,83.413431 17.322614,113.45167 43.750541,171.33298 93.695643,157.88089 L 95.167,157.41886 Z M 28.492993,83.825767 63.987419,74.474785 c 0,0 -1.034548,13.654555 -14.340768,17.162378 -13.309854,3.504116 -21.153658,-7.811396 -21.153658,-7.811396 z"
|
84
|
+
fill="#d65348"
|
85
|
+
id="path5" /><path
|
86
|
+
d="m 150.25466,143.65752 -1.37569,-0.33447 c -30.41869,-8.90972 -35.11012,-33.16636 -35.11012,-33.16636 l 42.13689,11.77828 22.30842,-85.723641 -0.26994,-0.07119 C 150.58171,28.812269 132.4278,15.996032 125.23416,9.9719198 115.03775,1.4315193 110.55248,-4.5037476 106.1384,4.473833 102.23975,12.392244 97.249446,25.27923 92.419329,43.319677 81.952963,82.385557 74.130442,164.82534 138.83161,182.17238 l 1.32601,0.29887 z M 106.66791,72.160957 c 0,0 10.19642,-15.858625 27.49007,-10.943223 17.30477,4.915403 18.64486,24.04676 18.64486,24.04676 z"
|
87
|
+
fill="#1d8d22"
|
88
|
+
id="path6" /><path
|
89
|
+
d="m 88.460606,126.07242 -8.064286,2.28861 c 1.9052,10.74002 5.263218,21.04694 10.533853,30.15245 0.917373,-0.20246 1.827331,-0.37674 2.761762,-0.63259 2.448802,-0.66078 4.719617,-1.47878 6.905885,-2.37094 -5.889136,-8.73915 -9.784822,-18.8043 -12.137214,-29.43753 z M 85.311722,50.428025 c -4.144126,15.467054 -7.851443,37.729496 -6.830985,60.059425 1.82659,-0.79278 3.756263,-1.53143 5.899521,-2.13955 l 1.492864,-0.33373 c -1.819915,-23.851711 2.114335,-48.157293 6.546207,-64.694493 1.123542,-4.183432 2.25005,-8.074668 3.37285,-11.703374 -1.808791,1.150981 -3.756263,2.330885 -5.974424,3.546387 -1.495831,4.617274 -3.006494,9.663942 -4.506033,15.265335 z"
|
90
|
+
fill="#c04b41"
|
91
|
+
id="path7" /></g></svg>
|
@@ -0,0 +1,144 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
get-version:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
outputs:
|
12
|
+
releaseVersion: ${{ steps.exposeVersion.outputs.releaseVersion }}
|
13
|
+
steps:
|
14
|
+
- name: Checkout repository
|
15
|
+
uses: actions/checkout@v4
|
16
|
+
- name: Setup Node.js
|
17
|
+
uses: actions/setup-node@v4
|
18
|
+
with:
|
19
|
+
node-version: '20'
|
20
|
+
- name: Cache node modules
|
21
|
+
uses: actions/cache@v4
|
22
|
+
with:
|
23
|
+
path: node_modules
|
24
|
+
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
25
|
+
restore-keys: |
|
26
|
+
node_modules-
|
27
|
+
- name: Install Node dependencies
|
28
|
+
run: npm install
|
29
|
+
- name: Get version from package.json
|
30
|
+
id: exposeVersion
|
31
|
+
run: echo "releaseVersion=$(npm run get-version --silent)" >> $GITHUB_OUTPUT
|
32
|
+
prepare-release:
|
33
|
+
needs: get-version
|
34
|
+
runs-on: ubuntu-latest
|
35
|
+
outputs:
|
36
|
+
versionInfo: ${{ steps.readChangelogEntry.outputs.log_entry }}
|
37
|
+
steps:
|
38
|
+
- name: Checkout repository
|
39
|
+
uses: actions/checkout@v4
|
40
|
+
- name: Configure git
|
41
|
+
run: |
|
42
|
+
git config --global user.email "info@orangebeard.io"
|
43
|
+
git config --global user.name "Orangebeard.io"
|
44
|
+
- name: Create tag
|
45
|
+
run: |
|
46
|
+
git tag -a v${{ needs.get-version.outputs.releaseVersion }} -m ${{ needs.get-version.outputs.releaseVersion }}
|
47
|
+
git push origin main --follow-tags
|
48
|
+
- name: Setup Node.js
|
49
|
+
uses: actions/setup-node@v4
|
50
|
+
with:
|
51
|
+
node-version: '20'
|
52
|
+
- name: Cache node modules
|
53
|
+
uses: actions/cache@v4
|
54
|
+
with:
|
55
|
+
path: node_modules
|
56
|
+
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
57
|
+
restore-keys: |
|
58
|
+
node_modules-
|
59
|
+
- name: Install Node dependencies
|
60
|
+
run: npm install
|
61
|
+
- name: Create CHANGELOG.md
|
62
|
+
run: npm run create-changelog
|
63
|
+
- name: Upload changelog as artifact
|
64
|
+
uses: actions/upload-artifact@v4
|
65
|
+
with:
|
66
|
+
name: changelog
|
67
|
+
path: CHANGELOG.md
|
68
|
+
create-release:
|
69
|
+
needs: [get-version, prepare-release]
|
70
|
+
runs-on: ubuntu-latest
|
71
|
+
steps:
|
72
|
+
- name: Checkout repository
|
73
|
+
uses: actions/checkout@v4
|
74
|
+
- name: Download changelog for artifact
|
75
|
+
uses: actions/download-artifact@v4
|
76
|
+
with:
|
77
|
+
name: changelog
|
78
|
+
- name: Create Release
|
79
|
+
id: createRelease
|
80
|
+
uses: ncipollo/release-action@v1
|
81
|
+
env:
|
82
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
83
|
+
with:
|
84
|
+
tag: v${{ needs.get-version.outputs.releaseVersion }}
|
85
|
+
name: ${{ needs.get-version.outputs.releaseVersion }}
|
86
|
+
bodyFile: CHANGELOG.md
|
87
|
+
publish-release:
|
88
|
+
needs: [get-version, prepare-release, create-release]
|
89
|
+
runs-on: ubuntu-latest
|
90
|
+
permissions:
|
91
|
+
contents: read
|
92
|
+
id-token: write
|
93
|
+
steps:
|
94
|
+
- name: Checkout repository
|
95
|
+
uses: actions/checkout@v4
|
96
|
+
- name: Setup Node.js
|
97
|
+
uses: actions/setup-node@v4
|
98
|
+
with:
|
99
|
+
node-version: '20'
|
100
|
+
registry-url: 'https://registry.npmjs.org'
|
101
|
+
- name: Cache node modules
|
102
|
+
uses: actions/cache@v4
|
103
|
+
with:
|
104
|
+
path: node_modules
|
105
|
+
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
106
|
+
restore-keys: |
|
107
|
+
node_modules-
|
108
|
+
- name: Transpile to JS
|
109
|
+
run: npm run build
|
110
|
+
- name: Install Node dependencies
|
111
|
+
run: npm install
|
112
|
+
- name: Publish to NPM
|
113
|
+
run: npm publish --provenance --access public
|
114
|
+
env:
|
115
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
116
|
+
update-version:
|
117
|
+
needs: [get-version, prepare-release, create-release, publish-release]
|
118
|
+
runs-on: ubuntu-latest
|
119
|
+
steps:
|
120
|
+
- name: Checkout repository
|
121
|
+
uses: actions/checkout@v4
|
122
|
+
- name: Configure git
|
123
|
+
run: |
|
124
|
+
git config --global user.email "info@orangebeard.io"
|
125
|
+
git config --global user.name "Orangebeard.io"
|
126
|
+
- name: Setup Node.js
|
127
|
+
uses: actions/setup-node@v4
|
128
|
+
with:
|
129
|
+
node-version: '20'
|
130
|
+
- name: Cache node modules
|
131
|
+
uses: actions/cache@v4
|
132
|
+
with:
|
133
|
+
path: node_modules
|
134
|
+
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
135
|
+
restore-keys: |
|
136
|
+
node_modules-
|
137
|
+
- name: Install Node dependencies
|
138
|
+
run: npm install
|
139
|
+
- name: Update version
|
140
|
+
run: |
|
141
|
+
npm run update-version
|
142
|
+
git add package.json package-lock.json
|
143
|
+
git commit -m "Update version"
|
144
|
+
git push origin main
|