Skip to content

Commit 618dd88

Browse files
committed
chore(release): version packages
1 parent 9ad99a3 commit 618dd88

File tree

4 files changed

+18
-34
lines changed

4 files changed

+18
-34
lines changed

.changeset/fluffy-kings-relax.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/workflows/announce.yml

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,20 @@
1-
name: Announce fetch-kit Release
1+
name: Announce Release on Discord
22

33
on:
44
push:
55
tags:
6-
- 'v*.*.*'
6+
- 'v*'
77

88
jobs:
99
announce:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout repo
13-
uses: actions/checkout@v3
14-
15-
- name: Announce to Discord
12+
- name: Post to Discord
1613
run: |
17-
# Get the tag that triggered the workflow
18-
TAG=${GITHUB_REF#refs/tags/} # e.g., v4.0.6
19-
VERSION=${TAG#v} # remove leading 'v' to match CHANGELOG.md headers
20-
21-
# Extract the changelog block under that version until the next '##'
22-
LATEST=$(sed -n "/^## $VERSION$/,/^## /{ /^## /!p }" CHANGELOG.md)
23-
24-
# If nothing found, fallback
25-
if [ -z "$LATEST" ]; then
26-
LATEST="(no changelog entry found for $VERSION)"
27-
fi
28-
29-
# Escape JSON special characters
30-
LATEST_ESC=$(echo "$LATEST" | sed 's/\\/\\\\/g; s/"/\\"/g')
31-
32-
# Send Discord message
33-
curl -sS -H "Content-Type: application/json" \
34-
-X POST \
35-
-d "{\"content\": \"📦 **New fetch-kit Release: $TAG**\nRepository: $GITHUB_REPOSITORY\n\`\`\`\n$LATEST_ESC\n\`\`\`\"}" \
36-
${{ secrets.DISCORD_WEBHOOK }}
14+
payload=$(jq -n \
15+
--arg content "New fetch-kit Release: $GITHUB_REF_NAME" \
16+
'{content: $content}')
17+
curl -X POST \
18+
-H "Content-Type: application/json" \
19+
-d "$payload" \
20+
"${{ secrets.DISCORD_WEBHOOK }}"

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# ffetch
22

3+
## 4.0.8
4+
5+
### Patch Changes
6+
7+
- 9ad99a3: Fixed
8+
- Discord announcement
9+
310
## 4.0.7
411

512
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fetchkit/ffetch",
3-
"version": "4.0.7",
3+
"version": "4.0.8",
44
"description": "Fetch wrapper with configurable timeouts, retries, and TypeScript-first DX",
55
"keywords": [
66
"fetch",

0 commit comments

Comments
 (0)