Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/publish-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Next

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: publish-next-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: "https://registry.npmjs.org"

- name: Set next version
run: |
BASE_VERSION=$(node -p "require('./package.json').version")
DATE=$(date -u +%Y-%m-%d)
SHA=${GITHUB_SHA::8}
VERSION="${BASE_VERSION}-next.${DATE}.${SHA}"
npm version "$VERSION" --no-git-tag-version

- name: Verify package contents
run: npm pack --dry-run

- name: Publish to npm
run: npm publish --access public --tag next --provenance
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "@cloudflare/api-schemas",
"version": "0.0.0",
"description": "OpenAPI schemas for the Cloudflare API.",
"license": "BSD-3-Clause",
"files": ["openapi.json"],
"main": "./openapi.json",
"exports": {
".": "./openapi.json",
"./openapi.json": "./openapi.json"
},
"publishConfig": {
"access": "public"
}
}