1
0

3 Commits

Author SHA1 Message Date
d1c84cf6f6 3.2.10 2024-10-26 23:08:28 +02:00
ba67b34a0d update pipelines 2024-10-26 23:08:10 +02:00
2d5bdfe40e update readme 2024-10-26 23:07:54 +02:00
6 changed files with 53 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
name: Publish name: Publish
run-name: Publish ${{ github.ref_name }}
on: on:
release: release:
@@ -13,21 +14,27 @@ jobs:
with: with:
node-version: latest node-version: latest
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run tests - name: Run tests
run: npm test run: npm test
- name: Build - name: Build
run: npm run build run: npm run build
- name: Publish to npmjs - name: Publish to npmjs
env: env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --tag latest --access public run: npm publish --tag ${{ contains(github.ref_name, '-') && 'pre' || 'latest' }} --access public
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: latest node-version: latest
registry-url: https://npm.pkg.github.com/ registry-url: https://npm.pkg.github.com/
- name: Publish to GPR - name: Publish to GPR
env: env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish --tag latest --access public run: npm publish --tag ${{ contains(github.ref_name, '-') && 'pre' || 'latest' }} --access public

31
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Release
run-name: Release ${{ github.ref_name }}
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: latest
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Create release
run: gh release create ${{ github.ref_name }} --draft --generate-notes ${{ contains(github.ref_name, '-') && '--prerelease --latest=false' || '--latest' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -15,7 +15,12 @@ jobs:
with: with:
node-version: latest node-version: latest
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run tests - name: Run tests
run: npm test run: npm test
- name: Build
run: npm run build

View File

@@ -18,8 +18,9 @@ When I was trying out Cloudflare Workers I almost immediately noticed how fast i
- ZERO dependencies - ZERO dependencies
- Lightweight (1.0K gzipped) - Lightweight (1.0K gzipped)
- Fully written in TypeScript - Fully written in TypeScript
- Integrated Debug-Mode & CORS helper
- Built specifically around Middlewares - Built specifically around Middlewares
- Debug-Mode, CORS and Bearer helpers
- Allows accessing request body multiple times
## Usage ## Usage

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@tsndr/cloudflare-worker-router", "name": "@tsndr/cloudflare-worker-router",
"version": "3.2.9", "version": "3.2.10",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@tsndr/cloudflare-worker-router", "name": "@tsndr/cloudflare-worker-router",
"version": "3.2.9", "version": "3.2.10",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"@cloudflare/workers-types": "^4.20241022.0", "@cloudflare/workers-types": "^4.20241022.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@tsndr/cloudflare-worker-router", "name": "@tsndr/cloudflare-worker-router",
"version": "3.2.9", "version": "3.2.10",
"description": "", "description": "",
"type": "module", "type": "module",
"exports": "./index.js", "exports": "./index.js",