@wise/wds-codemods 0.0.1-experimental-e8c3fbe → 0.0.1-experimental-4bee5c0

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.
@@ -64,6 +64,7 @@ jobs:
64
64
  shell: bash
65
65
 
66
66
  - name: Publish snapshot release on npm
67
+ id: publish-experimental
67
68
  run: |
68
69
  # Get current version from package.json
69
70
  CURRENT_VERSION=$(node -p "require('./package.json').version")
@@ -72,12 +73,34 @@ jobs:
72
73
  # Update package.json version directly
73
74
  npm version $EXPERIMENTAL_VERSION --no-git-tag-version
74
75
 
75
- # Publish the experimental version
76
- npm publish --tag experimental
76
+ # Publish the experimental version and capture output
77
+ PUBLISH_OUTPUT=$(npm publish --tag experimental 2>&1)
78
+ echo "$PUBLISH_OUTPUT"
79
+
80
+ # Extract the published package name and version from npm output
81
+ PUBLISHED_PACKAGE=$(echo "$PUBLISH_OUTPUT" | grep -o '@wise/wds-codemods@[^[:space:]]*' | head -1)
82
+ echo "published_package=$PUBLISHED_PACKAGE" >> $GITHUB_OUTPUT
77
83
  env:
78
84
  GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
79
85
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_AUTOMATION }}
80
86
 
87
+ - name: Update job status with build ID
88
+ uses: actions/github-script@v7
89
+ with:
90
+ github-token: ${{ secrets.GH_ACCESS_TOKEN }}
91
+ script: |
92
+ const publishedPackage = '${{ steps.publish-experimental.outputs.published_package }}';
93
+
94
+ await github.rest.repos.createCommitStatus({
95
+ owner: context.repo.owner,
96
+ repo: context.repo.repo,
97
+ sha: context.sha,
98
+ state: 'success',
99
+ target_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
100
+ description: publishedPackage,
101
+ context: 'Experimental build'
102
+ });
103
+
81
104
  publish:
82
105
  name: 🚀 Publish stable packages
83
106
  if: ${{ github.ref == 'refs/heads/main' }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wise/wds-codemods",
3
- "version": "0.0.1-experimental-e8c3fbe",
3
+ "version": "0.0.1-experimental-4bee5c0",
4
4
  "license": "UNLICENSED",
5
5
  "author": "Wise Payments Ltd.",
6
6
  "type": "module",