File tree Expand file tree Collapse file tree 2 files changed +20
-13
lines changed
Expand file tree Collapse file tree 2 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,25 @@ jobs:
2626 - name : Build
2727 run : npm run build
2828
29- - name : Verify build artifacts
29+ - name : List build output
3030 run : |
31+ echo "Listing contents of the dist directory:"
3132 ls -R dist
32- [ -f dist/cjs/production/index.jsx ] || exit 1
33- [ -f dist/esm/production/index.jsx ] || exit 1
34- [ -f dist/types/index.d.ts ] || exit 1
33+
34+ - name : Find built files
35+ id : find_files
36+ run : |
37+ CJS_FILE=$(find dist -name "*.cjs.js" -or -name "index.js" -or -name "index.jsx" | grep "/cjs/" | head -n 1)
38+ ESM_FILE=$(find dist -name "*.esm.js" -or -name "index.js" -or -name "index.jsx" | grep "/esm/" | head -n 1)
39+ TYPES_FILE=$(find dist -name "index.d.ts" | head -n 1)
40+
41+ echo "CJS file: $CJS_FILE"
42+ echo "ESM file: $ESM_FILE"
43+ echo "Types file: $TYPES_FILE"
44+
45+ echo "cjs_file=$CJS_FILE" >> $GITHUB_OUTPUT
46+ echo "esm_file=$ESM_FILE" >> $GITHUB_OUTPUT
47+ echo "types_file=$TYPES_FILE" >> $GITHUB_OUTPUT
3548
3649 - name : Publish to npm
3750 run : npm publish
4255 uses : softprops/action-gh-release@v1
4356 with :
4457 files : |
45- dist/cjs/production/index.jsx
46- dist/esm/production/index.jsx
47- dist/types/index.d.ts
58+ ${{ steps.find_files.outputs.cjs_file }}
59+ ${{ steps.find_files.outputs.esm_file }}
60+ ${{ steps.find_files.outputs.types_file }}
4861 env :
4962 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -246,9 +246,3 @@ Contributions are welcome! Feel free to open issues or submit pull requests.
246246
247247This project is licensed under the MIT License.
248248
249-
250- ## Releases
251-
252- ` npm run release -- --release-as minor ` for a minor version bump
253- ` npm run release -- --release-as major ` for a major version bump
254- ` npm run release -- --prerelease ` for a prerelease version
You can’t perform that action at this time.
0 commit comments