@pubm-test/prerelease 1.0.0-next.20260408140205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/e2e.yaml +64 -0
- package/README.md +5 -0
- package/package.json +11 -0
- package/pubm.config.ts +6 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: E2E Test
|
|
2
|
+
on:
|
|
3
|
+
repository_dispatch:
|
|
4
|
+
types: [pubm-release]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
inputs:
|
|
7
|
+
pubm_version:
|
|
8
|
+
description: "pubm version to test"
|
|
9
|
+
default: "latest"
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
e2e:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: oven-sh/setup-bun@v2
|
|
22
|
+
with:
|
|
23
|
+
bun-version: latest
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: bun add pubm@${{ inputs.pubm_version || github.event.client_payload.pubm_version || 'latest' }} @pubm/core@${{ inputs.pubm_version || github.event.client_payload.pubm_version || 'latest' }}
|
|
27
|
+
|
|
28
|
+
- name: Setup npm auth
|
|
29
|
+
run: |
|
|
30
|
+
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
|
|
31
|
+
echo "access=public" >> .npmrc
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
34
|
+
|
|
35
|
+
- name: Set prerelease version
|
|
36
|
+
run: |
|
|
37
|
+
TIMESTAMP=$(date +%Y%m%d%H%M%S)
|
|
38
|
+
VERSION="1.0.0-next.${TIMESTAMP}"
|
|
39
|
+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
|
|
40
|
+
node -e "
|
|
41
|
+
const fs = require('fs');
|
|
42
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
|
|
43
|
+
pkg.version = '${VERSION}';
|
|
44
|
+
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
|
|
45
|
+
"
|
|
46
|
+
|
|
47
|
+
- name: Publish with next tag
|
|
48
|
+
run: bunx pubm --mode ci --phase publish --any-branch --skip-release --tag next
|
|
49
|
+
env:
|
|
50
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
51
|
+
|
|
52
|
+
- name: Verify deployment
|
|
53
|
+
run: |
|
|
54
|
+
sleep 30
|
|
55
|
+
npm view @pubm-test/prerelease@${{ env.VERSION }}
|
|
56
|
+
|
|
57
|
+
- name: Verify dist-tag
|
|
58
|
+
run: |
|
|
59
|
+
NEXT_VER=$(npm dist-tag ls @pubm-test/prerelease | grep "next:" | awk '{print $2}')
|
|
60
|
+
if [ "$NEXT_VER" != "${{ env.VERSION }}" ]; then
|
|
61
|
+
echo "::error::next dist-tag not set correctly (expected ${{ env.VERSION }}, got $NEXT_VER)"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
echo "next dist-tag verified: $NEXT_VER"
|
package/README.md
ADDED
package/package.json
ADDED
package/pubm.config.ts
ADDED
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const name = "@pubm-test/prerelease";
|