forked from cluesmith/codev
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.23 KB
/
post-release-e2e.yml
File metadata and controls
76 lines (64 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Post-Release E2E Verification
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Package version to verify (e.g., 1.1.0)'
required: true
type: string
jobs:
verify:
name: Verify Release (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Determine package version
id: version
run: |
if [[ -n "${{ inputs.version }}" ]]; then
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
# Extract version from release tag (remove 'v' prefix if present)
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
fi
- name: Wait for npm propagation
run: |
echo "Waiting 120 seconds for npm registry propagation..."
sleep 120
- name: Verify package available on npm
run: |
npm view @cluesmith/codev@${{ steps.version.outputs.version }}
- name: Download published package
run: |
mkdir -p /tmp/e2e-verify
cd /tmp/e2e-verify
npm pack @cluesmith/codev@${{ steps.version.outputs.version }}
- name: Set tarball path
id: tarball
run: |
TARBALL=$(ls /tmp/e2e-verify/*.tgz | head -1)
echo "path=$TARBALL" >> $GITHUB_OUTPUT
- name: Verify installation
run: node packages/codev/scripts/verify-install.mjs "${{ steps.tarball.outputs.path }}"
- name: Report success
if: success()
run: |
echo "✅ Post-release verification passed for @cluesmith/codev@${{ steps.version.outputs.version }}"
- name: Report failure
if: failure()
run: |
echo "❌ Post-release verification FAILED for @cluesmith/codev@${{ steps.version.outputs.version }}"
echo "Please investigate and consider yanking the release if critical issues found."