Skip to content

Commit 2b431fd

Browse files
committed
Initial implementation
1 parent a49783c commit 2b431fd

17 files changed

+2734
-2
lines changed

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: ox-harris # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: webqit # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/publish.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
registry-url: 'https://registry.npmjs.org/'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build
26+
run: npm run build
27+
28+
- name: Determine npm tag
29+
id: tag
30+
run: |
31+
# Extract tag name without "refs/tags/"
32+
TAG_REF=${GITHUB_REF#refs/tags/}
33+
echo "Detected Git tag: $TAG_REF"
34+
35+
# Determine npm tag
36+
if [[ "$TAG_REF" == *-* ]]; then
37+
# prerelease (contains a hyphen)
38+
NPM_TAG=$(echo "$TAG_REF" | sed -E 's/^v[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z0-9]+).*/\1/')
39+
else
40+
NPM_TAG="latest"
41+
fi
42+
echo "npm publish will use tag: $NPM_TAG"
43+
echo "tag=$NPM_TAG" >> $GITHUB_OUTPUT
44+
45+
- name: Publish to npm
46+
env:
47+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
run: npm publish --tag ${{ steps.tag.outputs.tag }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.*
2+
3+
!/.github
4+
!.vitepress
5+
!/.gitignore
6+
node_modules

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# fetch-plus
2-
Upgraded fetch API
1+
# Fetch+
2+
3+
Upgraded fetch API and the LiveResponse API. Docs coming soon.

0 commit comments

Comments
 (0)