Skip to content

Commit fc11d5d

Browse files
committed
v0.1.2
1 parent 1d3c393 commit fc11d5d

File tree

2 files changed

+4
-84
lines changed

2 files changed

+4
-84
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: 📦 Build & Publish
22

33
on:
4-
push:
5-
tags:
6-
- 'v*.*.*'
74
release:
85
types: [published]
96
workflow_dispatch:
@@ -222,7 +219,7 @@ jobs:
222219
publish-github:
223220
name: 📦 Publish to GitHub Packages
224221
runs-on: ubuntu-latest
225-
needs: pre-checks
222+
needs: [pre-checks, publish-npm]
226223
if: github.repository == 'codev911/elysia-http-exception' && !inputs.dry_run
227224

228225
permissions:
@@ -281,81 +278,11 @@ jobs:
281278
env:
282279
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
283280

284-
# Job 4: Create GitHub Release
285-
github-release:
286-
name: 🚀 Create GitHub Release
287-
runs-on: ubuntu-latest
288-
needs: [pre-checks, publish-npm]
289-
if: github.repository == 'codev911/elysia-http-exception' && !inputs.dry_run && github.event_name != 'release'
290-
291-
permissions:
292-
contents: write
293-
294-
steps:
295-
- name: 📥 Checkout Repository
296-
uses: actions/checkout@v4
297-
with:
298-
fetch-depth: 0
299-
300-
- name: 📋 Generate Release Notes
301-
id: changelog
302-
run: |
303-
VERSION="${{ needs.pre-checks.outputs.version }}"
304-
305-
# Get the latest tag
306-
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
307-
308-
if [[ -n "$LATEST_TAG" ]]; then
309-
echo "Generating changelog from $LATEST_TAG to HEAD"
310-
CHANGELOG=$(git log $LATEST_TAG..HEAD --pretty=format:"- %s (%h)" --no-merges)
311-
else
312-
echo "No previous tags found, generating changelog from first commit"
313-
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
314-
fi
315-
316-
# Create release notes
317-
cat > release_notes.md << EOF
318-
## 🚀 What's New in v$VERSION
319-
320-
### 📋 Changes
321-
$CHANGELOG
322-
323-
### 📦 Installation
324-
\`\`\`bash
325-
# Using bun (recommended)
326-
bun add elysia-http-exception@$VERSION
327-
328-
# Using npm
329-
npm install elysia-http-exception@$VERSION
330-
\`\`\`
331-
332-
### 📚 Documentation
333-
- [README](https://github.com/codev911/elysia-http-exception#readme)
334-
- [Examples](https://github.com/codev911/elysia-http-exception/tree/main/example)
335-
- [npm Package](https://www.npmjs.com/package/elysia-http-exception)
336-
337-
### 🙏 Contributors
338-
Thank you to all contributors who made this release possible!
339-
EOF
340-
341-
echo "release_notes_file=release_notes.md" >> $GITHUB_OUTPUT
342-
343-
- name: 🚀 Create Release
344-
uses: actions/create-release@v1
345-
env:
346-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
347-
with:
348-
tag_name: v${{ needs.pre-checks.outputs.version }}
349-
release_name: 🚀 Release v${{ needs.pre-checks.outputs.version }}
350-
body_path: ${{ steps.changelog.outputs.release_notes_file }}
351-
draft: false
352-
prerelease: ${{ needs.pre-checks.outputs.is-prerelease }}
353-
354-
# Job 5: Post-publish Tasks
281+
# Job 4: Post-publish Tasks
355282
post-publish:
356283
name: 📋 Post-publish Tasks
357284
runs-on: ubuntu-latest
358-
needs: [pre-checks, publish-npm, publish-github, github-release]
285+
needs: [pre-checks, publish-npm, publish-github]
359286
if: always() && github.repository == 'codev911/elysia-http-exception' && !inputs.dry_run
360287

361288
steps:
@@ -381,13 +308,6 @@ jobs:
381308
echo "❌ **GitHub Packages**: Failed to publish" >> $GITHUB_STEP_SUMMARY
382309
fi
383310
384-
if [[ "${{ needs.github-release.result }}" == "success" ]]; then
385-
echo "✅ **GitHub Release**: Successfully created" >> $GITHUB_STEP_SUMMARY
386-
echo " - 🔗 [View Release](https://github.com/codev911/elysia-http-exception/releases/tag/v${{ needs.pre-checks.outputs.version }})" >> $GITHUB_STEP_SUMMARY
387-
else
388-
echo "❌ **GitHub Release**: Failed to create" >> $GITHUB_STEP_SUMMARY
389-
fi
390-
391311
echo "" >> $GITHUB_STEP_SUMMARY
392312
echo "### 🛠️ Installation Command:" >> $GITHUB_STEP_SUMMARY
393313
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "elysia-http-exception",
33
"description": "Elysia plugin for handling HTTP 4xx and 5xx errors with structured exception classes and automatic error responses",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/codev911/elysia-http-exception"

0 commit comments

Comments
 (0)