Skip to content

Commit a12adc9

Browse files
committed
initial
1 parent e197d4d commit a12adc9

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

.github/workflows/npm-publish.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff 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
@@ -42,8 +55,8 @@ jobs:
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 }}

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,3 @@ Contributions are welcome! Feel free to open issues or submit pull requests.
246246

247247
This 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

0 commit comments

Comments
 (0)