@oliasoft-open-source/react-ui-library 2.2.2 → 2.3.1
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 +3 -0
- package/package.json +1 -1
- package/scripts/send-mattermost-message.sh +21 -0
package/.gitlab-ci.yml
CHANGED
|
@@ -42,6 +42,8 @@ publish:
|
|
|
42
42
|
script:
|
|
43
43
|
# Get the version from package.json
|
|
44
44
|
- VERSION=$(node -p "require('./package.json').version")
|
|
45
|
+
# Prepare MatterMost message
|
|
46
|
+
- MESSAGE="🤖 React UI Library version $VERSION released"
|
|
45
47
|
# Prepare .npmrc
|
|
46
48
|
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
47
49
|
# Configure git
|
|
@@ -70,4 +72,5 @@ publish:
|
|
|
70
72
|
# Publish the NPM package to the public NPM registry
|
|
71
73
|
echo "Publishing package to NPM registry"
|
|
72
74
|
npm publish
|
|
75
|
+
./scripts/send-mattermost-message.sh "$MATTERMOST_BOT_KEY" "$MESSAGE"
|
|
73
76
|
fi
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -eEuo pipefail
|
|
3
|
+
|
|
4
|
+
# This script requires the following things to be installed:
|
|
5
|
+
# - bash
|
|
6
|
+
# - curl
|
|
7
|
+
|
|
8
|
+
# Required inputs:
|
|
9
|
+
MATTERMOST_BOT_KEY=$1
|
|
10
|
+
MSG=$2
|
|
11
|
+
|
|
12
|
+
# Optional inputs:
|
|
13
|
+
CHANNEL=${3:-'#releases'}
|
|
14
|
+
USERNAME=${4:-'Gitlab CI/CD'}
|
|
15
|
+
ICON_URL=${5:-'https://avatars.githubusercontent.com/in/1724?s=80&v=4'}
|
|
16
|
+
MATTERMOST_URL=${6:-'https://mm.oliasoft.com/hooks/'}
|
|
17
|
+
|
|
18
|
+
curl -X POST \
|
|
19
|
+
--data-urlencode \
|
|
20
|
+
"payload={\"channel\": \"$CHANNEL\", \"username\": \"$USERNAME\", \"icon_url\": \"$ICON_URL\", \"text\": \"$MSG\"}" \
|
|
21
|
+
$MATTERMOST_URL$MATTERMOST_BOT_KEY
|