@anddone/adminportaltestautomation 1.1.1 → 1.2.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.
@@ -44,23 +44,15 @@ jobs:
44
44
  # 6. Bump version safely
45
45
  - name: Bump version
46
46
  run: |
47
- # Get release type (patch/minor/major)
48
47
  RELEASE_TYPE=${{ inputs.release_type }}
49
-
50
- # Get current version
51
48
  CURRENT_VERSION=$(node -p "require('./package.json').version")
52
-
53
- # Calculate new version
54
49
  NEW_VERSION=$(npm version $RELEASE_TYPE --no-git-tag-version)
55
-
56
50
  echo "Current version: $CURRENT_VERSION"
57
51
  echo "New version: $NEW_VERSION"
58
-
59
- # Commit package.json changes
60
52
  git add package.json
61
53
  git commit -m "chore(release): $NEW_VERSION"
62
54
 
63
- # Delete tag if exists (to avoid CI errors)
55
+ # Delete tag if exists
64
56
  if git rev-parse "v$NEW_VERSION" >/dev/null 2>&1; then
65
57
  git tag -d "v$NEW_VERSION"
66
58
  git push origin :refs/tags/v$NEW_VERSION
@@ -80,11 +72,20 @@ jobs:
80
72
  - name: Slack Success
81
73
  if: success()
82
74
  run: |
75
+ PACKAGE_NAME=$(node -p "require('./package.json').name")
83
76
  VERSION=$(node -p "require('./package.json').version")
77
+ # Read release notes from file (multiline supported)
78
+ if [ -f release-note.txt ]; then
79
+ RELEASE_NOTES=$(sed ':a;N;$!ba;s/\n/\\n• /g' release-note.txt)
80
+ RELEASE_NOTES="• $RELEASE_NOTES"
81
+ else
82
+ RELEASE_NOTES="• No release notes provided"
83
+ fi
84
+
84
85
  curl -X POST -H 'Content-type: application/json' \
85
86
  --data "{
86
- \"username\": \"AdminPortalTestAutomation\",
87
- \"text\": \":white_check_mark: npm package published!\n*Version:* $VERSION\n*Notes:*\n• Added fileCommonUtils\n• File handling methods\n• Supports text, XLSX, JSON\"
87
+ \"username\": \"$PACKAGE_NAME\",
88
+ \"text\": \":white_check_mark: npm package published!\n*Package:* $PACKAGE_NAME\n*Version:* $VERSION\n*Notes:*\n$RELEASE_NOTES\"
88
89
  }" \
89
90
  ${{ secrets.SLACK_WEBHOOK_URL }}
90
91
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anddone/adminportaltestautomation",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Admin Portal Test Automation package",