File tree 4 files changed +29
-38
lines changed
4 files changed +29
-38
lines changed Original file line number Diff line number Diff line change 6
6
- main
7
7
- ' releases/*'
8
8
9
+ permissions :
10
+ contents : read
11
+
9
12
jobs :
10
13
lint :
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- uses : actions/checkout@v3
14
17
15
- # check the node version from the .node-version file
16
- - name : fetch node version
17
- id : node-version
18
- run : |
19
- version=$(cat .node-version)
20
- echo "version=${version}" >> $GITHUB_OUTPUT
21
-
22
18
- name : setup node
23
- uses : actions/setup-node@v3
19
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
24
20
with :
25
- node-version : ${{ steps .node-version.outputs.version }}
26
- cache : npm
21
+ node-version-file : .node-version
22
+ cache : ' npm'
27
23
28
24
- name : install dependencies
29
25
run : npm ci
Original file line number Diff line number Diff line change 7
7
pull_request :
8
8
workflow_dispatch :
9
9
10
+ permissions :
11
+ contents : read
12
+
10
13
jobs :
11
14
package-check :
12
15
runs-on : ubuntu-latest
13
16
14
17
steps :
15
18
- uses : actions/checkout@v3
16
19
17
- # check the node version from the .node-version file
18
- - name : fetch node version
19
- id : node-version
20
- run : |
21
- version=$(cat .node-version)
22
- echo "version=${version}" >> $GITHUB_OUTPUT
23
-
24
20
- name : setup node
25
- uses : actions/setup-node@v3
21
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
26
22
with :
27
- node-version : ${{ steps .node-version.outputs.version }}
28
- cache : npm
23
+ node-version-file : .node-version
24
+ cache : ' npm'
29
25
30
- - name : Install dependencies
26
+ - name : install dependencies
31
27
run : npm ci
32
28
33
- - name : Rebuild the dist/ directory
29
+ - name : rebuild the dist/ directory
34
30
run : npm run bundle
35
31
36
- - name : Compare the expected and actual dist/ directories
32
+ - name : compare the expected and actual dist/ directories
37
33
run : |
38
34
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
39
35
echo "Detected uncommitted changes after build. See status below:"
43
39
id : diff
44
40
45
41
# If index.js was different than expected, upload the expected version as an artifact
46
- - uses : actions/upload-artifact@v3
42
+ -
uses :
actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # [email protected]
47
43
if : ${{ failure() && steps.diff.conclusion == 'failure' }}
48
44
with :
49
45
name : dist
Original file line number Diff line number Diff line change 6
6
- main
7
7
- ' releases/*'
8
8
9
+ permissions :
10
+ contents : read
11
+
9
12
jobs :
10
13
test :
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- uses : actions/checkout@v3
14
17
15
- # check the node version from the .node-version file
16
- - name : fetch node version
17
- id : node-version
18
- run : |
19
- version=$(cat .node-version)
20
- echo "version=${version}" >> $GITHUB_OUTPUT
21
-
22
18
- name : setup node
23
- uses : actions/setup-node@v3
19
+ uses :
actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # [email protected]
24
20
with :
25
- node-version : ${{ steps.node-version.outputs.version }}
26
- cache : npm
21
+ node-version-file : .node-version
22
+ cache : ' npm'
23
+
24
+ - name : install dependencies
25
+ run : npm ci
27
26
28
- - run : npm ci
29
- - run : npm run ci-test
27
+ - name : test
28
+ run : npm run ci-test
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ GREEN='\033[0;32m'
10
10
BLUE=' \033[0;34m'
11
11
12
12
latest_tag=$( git describe --tags $( git rev-list --tags --max-count=1) )
13
- echo -e " The latest release tag is:${BLUE}${latest_tag}${OFF} "
13
+ echo -e " The latest release tag is: ${BLUE}${latest_tag}${OFF} "
14
14
read -p ' New Release Tag (vX.X.X format): ' new_tag
15
15
16
16
tag_regex=' ^v\d\.\d\.\d$'
@@ -26,5 +26,5 @@ echo -e "${GREEN}OK${OFF} - Tagged: $new_tag"
26
26
27
27
git push --tags
28
28
29
- echo -e " ${GREEN} OK${OFF} - Tags pushed to remote! This will trigger a GitHub action release "
29
+ echo -e " ${GREEN} OK${OFF} - Tags pushed to remote!"
30
30
echo -e " ${GREEN} DONE${OFF} "
You can’t perform that action at this time.
0 commit comments