@benshawmean/envedit 1.2.0 → 1.2.2
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/.gitlab-ci.yml +19 -12
- package/ci/npm.sh +4 -0
- package/package.json +1 -1
package/.gitlab-ci.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
stages:
|
|
2
2
|
- test
|
|
3
|
-
-
|
|
3
|
+
- publish
|
|
4
4
|
|
|
5
5
|
workflow:
|
|
6
6
|
rules:
|
|
@@ -17,27 +17,29 @@ default:
|
|
|
17
17
|
- bun install --quiet
|
|
18
18
|
|
|
19
19
|
variables:
|
|
20
|
-
GLAB_NPM_REG:
|
|
20
|
+
GLAB_NPM_REG: ${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/
|
|
21
21
|
VERSION_REGEX: /^v\d+\.\d+\.\d+(-\S*)?$/
|
|
22
|
-
NO_CI_REGEX: /(no|skip)\s+(ci|pipeline)/mi
|
|
23
22
|
|
|
24
23
|
test:
|
|
25
24
|
stage: test
|
|
25
|
+
|
|
26
26
|
rules:
|
|
27
27
|
- if: $CI_COMMIT_TAG || $CI_COMMIT_MESSAGE =~ $VERSION_REGEX
|
|
28
28
|
when: never
|
|
29
|
-
- if: $CI_COMMIT_DESCRIPTION =~ $NO_CI_REGEX
|
|
30
|
-
when: never
|
|
31
29
|
- if: $CI_COMMIT_BRANCH
|
|
32
30
|
when: always
|
|
31
|
+
|
|
33
32
|
allow_failure: false
|
|
33
|
+
|
|
34
34
|
script:
|
|
35
35
|
- bun test
|
|
36
36
|
- sed 's/amp;//' coverage/junit.xml > coverage/junit.xml.tmp # remove amp; from junit report to prevent gitlab parsing issues
|
|
37
37
|
- mv coverage/junit.xml.tmp coverage/junit.xml # make the change permanent
|
|
38
38
|
- cargo install -q lcov2xml # used to convert lcov output to cobertura-xml for gitlab code coverage parsing
|
|
39
39
|
- lcov2xml coverage/lcov.info -o coverage/cobertura-coverage.xml
|
|
40
|
+
|
|
40
41
|
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
|
|
42
|
+
|
|
41
43
|
artifacts:
|
|
42
44
|
reports:
|
|
43
45
|
junit: ./coverage/junit.xml
|
|
@@ -45,17 +47,19 @@ test:
|
|
|
45
47
|
coverage_format: cobertura
|
|
46
48
|
path: ./coverage/cobertura-coverage.xml
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
stage:
|
|
50
|
+
publish:
|
|
51
|
+
stage: publish
|
|
52
|
+
|
|
50
53
|
id_tokens:
|
|
51
54
|
SIGSTORE_ID_TOKEN:
|
|
52
55
|
aud: sigstore
|
|
53
56
|
NPM_ID_TOKEN:
|
|
54
57
|
aud: "npm:registry.npmjs.org"
|
|
58
|
+
|
|
55
59
|
rules:
|
|
56
60
|
- if: $CI_COMMIT_REF_PROTECTED && $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ $VERSION_REGEX
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
when: always
|
|
62
|
+
|
|
59
63
|
script:
|
|
60
64
|
- | # Setup environment variables for deployment
|
|
61
65
|
export PACKAGE_NAME=$(jq -r '.name' package.json)
|
|
@@ -68,9 +72,12 @@ deploy:
|
|
|
68
72
|
exit 9001
|
|
69
73
|
fi
|
|
70
74
|
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
- bun pm pack --filename package.tgz
|
|
76
|
+
- bunx npm publish -q package.tgz
|
|
77
|
+
- sh ci/npm.sh
|
|
78
|
+
- bun publish --silent package.tgz
|
|
79
|
+
- rm package.tgz .npmrc
|
|
80
|
+
|
|
74
81
|
allow_failure:
|
|
75
82
|
exit_codes:
|
|
76
83
|
- 9001
|
package/ci/npm.sh
ADDED