Skip to content

Commit c5c01e2

Browse files
committed
Test the release workflow (a throwaway branch, not a release)
1 parent 4e82fdf commit c5c01e2

137 files changed

Lines changed: 1059 additions & 470 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/release.yml‎

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Written by DocSpring/docspring's api_clients/scripts/generate from api_clients/github_workflows/javascript/release.yml:
2+
# change it there.
3+
#
4+
# Builds the package on every push and pull request. A v* tag (pushed by the monorepo's api_clients/scripts/release)
5+
# also publishes it to npm with trusted publishing, in the release environment, and waits until npm serves it.
6+
name: Release
7+
8+
on:
9+
push:
10+
branches: ['**']
11+
tags: ['v*']
12+
pull_request:
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
with:
23+
persist-credentials: false
24+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
25+
with:
26+
node-version: 24
27+
- name: Check the tag matches the package version
28+
if: github.ref_type == 'tag'
29+
run: |
30+
VERSION="$(node -p 'require("./package.json").version')"
31+
if [ "v$VERSION" != "$GITHUB_REF_NAME" ]; then
32+
echo "::error::The tag is $GITHUB_REF_NAME, but the package version is $VERSION"
33+
exit 1
34+
fi
35+
# npm ci runs the package's prepare script, which builds dist/
36+
- run: npm ci
37+
- run: npm pack
38+
- name: Publish dry run
39+
run: |
40+
VERSION="$(node -p 'require("./package.json").version')"
41+
# npm refuses a prerelease without a dist-tag, and latest must stay on the newest release
42+
DIST_TAG=latest
43+
case "$VERSION" in *-*) DIST_TAG=next ;; esac
44+
npm publish "docspring-$VERSION.tgz" --dry-run --access public --tag "$DIST_TAG"
45+
- if: github.ref_type == 'tag'
46+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
47+
with:
48+
name: package
49+
path: docspring-*.tgz
50+
if-no-files-found: error
51+
52+
publish:
53+
needs: build
54+
if: github.ref_type == 'tag'
55+
runs-on: ubuntu-latest
56+
environment: release
57+
permissions:
58+
contents: read
59+
id-token: write
60+
steps:
61+
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
62+
with:
63+
node-version: 24
64+
# Trusted publishing needs npm 11.5.1 or later
65+
- run: npm install --global npm@11.21.1
66+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
67+
with:
68+
name: package
69+
- name: Publish to npm
70+
run: |
71+
VERSION="${GITHUB_REF_NAME#v}"
72+
DIST_TAG=latest
73+
case "$VERSION" in *-*) DIST_TAG=next ;; esac
74+
npm publish "docspring-$VERSION.tgz" --access public --tag "$DIST_TAG"
75+
76+
verify:
77+
needs: publish
78+
runs-on: ubuntu-latest
79+
timeout-minutes: 15
80+
steps:
81+
- name: Wait until npm serves the version
82+
run: |
83+
VERSION="${GITHUB_REF_NAME#v}"
84+
for _ in $(seq 60); do
85+
if curl -fsS -o /dev/null "https://registry.npmjs.org/docspring/$VERSION"; then
86+
echo "npm serves docspring $VERSION"
87+
exit 0
88+
fi
89+
sleep 10
90+
done
91+
echo "::error::npm doesn't serve docspring $VERSION after 10 minutes"
92+
exit 1

‎CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
### 4.4.0 [October 31, 2026]
2+
3+
- New: page designs (`template_type` `page_designer`), PDFs designed in the Page Designer from a JSON layout, with no
4+
document to start from. create_template makes one from its `layout`, or with an empty page when `layout` is left
5+
out, and update_template replaces its layout. DocSpring adds a field for each value the layout reads. A template's
6+
`layout` is in the [Page Designer layout format](https://docspring.com/docs/page-designer/layout-format/) (its
7+
[JSON Schema](https://docspring.com/schemas/page-designer/layout.v1.json)), and is null for other templates.
8+
- New: every method that creates, changes or deletes something takes an `Idempotency-Key` header, as the
9+
`idempotencyKey` option. Send the same key when you send a request again after a timeout or a network error: within 24
10+
hours, DocSpring returns the first response instead of running the request twice. Arguments you already pass keep
11+
their places.
12+
- Changed: the request validator checks what API v2 now refuses: an ID, a query value or a template name that's blank or
13+
only whitespace, an update with nothing to change, a version with a leading zero (`01`), a `filename` with a slash, a
14+
signer `email` that isn't an email address, and an HTML template's `scale` outside 0.1 to 2.
15+
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.
16+
117
### 4.3.0 [October 31, 2026]
218

319
- New: get_template_model_code takes `rust` as its `lang`, for Rust structs that serde reads and writes.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ e-signatures.
1010
The code in this repository is generated from DocSpring's OpenAPI spec ([About this SDK](#about-this-sdk)). Issues and
1111
pull requests are welcome.
1212

13-
Version 4.3.0.
13+
Version 4.4.0.
1414

1515
## Install and configure
1616

0 commit comments

Comments
 (0)