Skip to content

Commit ec9b4f9

Browse files
committed
chore: release v0.0.2
1 parent fa29109 commit ec9b4f9

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
concurrency:
9+
group: publish-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
id-token: write
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
registry-url: https://registry.npmjs.org
28+
29+
- name: Verify tag matches package.json version
30+
run: |
31+
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
32+
PKG_VERSION=$(node -p "require('./package.json').version")
33+
if [ "${TAG_VERSION}" != "${PKG_VERSION}" ]; then
34+
echo "Tag v${TAG_VERSION} does not match package.json version ${PKG_VERSION}"
35+
exit 1
36+
fi
37+
38+
- name: Preview package contents
39+
run: npm pack --dry-run
40+
41+
- name: Publish to npm
42+
run: npm publish --provenance --access public
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "payplex",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"type": "module",
55
"description": "A unified payment middleware — route Stripe, Alipay, WeChat Pay and any custom provider through a single multiplexed interface with a defineProvider() plugin system",
66
"main": "./index.js",
@@ -14,6 +14,9 @@
1414
"index.js",
1515
"README.md"
1616
],
17+
"publishConfig": {
18+
"access": "public"
19+
},
1720
"keywords": [
1821
"payment",
1922
"stripe",

0 commit comments

Comments
 (0)