@@ -2,14 +2,16 @@ name: Publish Release
22
33on :
44 pull_request :
5- types : [closed]
5+ types : [closed, opened, synchronize, ready_for_review ]
66 branches :
77 - main
88
99jobs :
1010 publish-release :
11- # Only run on merged release PRs
12- if : github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
11+ # Run on merged release PRs OR any open PR for testing (temporarily hardcoded commits)
12+ if : |
13+ (github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')) ||
14+ (github.event.action != 'closed')
1315 runs-on : ubuntu-latest
1416 permissions :
1517 contents : write
2022 with :
2123 fetch-depth : 0
2224 token : ${{ secrets.GITHUB_TOKEN }}
23- ref : ${{ github.event.pull_request.merge_commit_sha }}
25+ ref : " 693f2de24 "
2426
2527 - name : Set up Rust
2628 uses : actions-rust-lang/setup-rust-toolchain@v1
@@ -34,38 +36,41 @@ jobs:
3436
3537 - name : Validate packages before publishing
3638 env :
37- BASE_SHA : ${{ github.event.pull_request.base.sha }}
39+ BASE_SHA : " 34686ce1e"
40+ HEAD_SHA : " 693f2de24"
3841 run : |
3942 echo "========================================="
4043 echo "Phase 1: Validation (dry-run)"
4144 echo "========================================="
42- # Compare base SHA with current HEAD (merge commit)
43- ./scripts/validate-packages.sh "$BASE_SHA" "HEAD "
45+ # Hardcoded commits for testing
46+ ./scripts/validate-packages.sh "$BASE_SHA" "$HEAD_SHA "
4447
4548 - name : Publish packages to crates.io
4649 env :
4750 CARGO_REGISTRY_TOKEN : ${{ secrets.CARGO_REGISTRY_TOKEN }}
48- BASE_SHA : ${{ github.event.pull_request.base.sha }}
51+ BASE_SHA : " 34686ce1e"
52+ HEAD_SHA : " 693f2de24"
4953 run : |
5054 echo ""
5155 echo "========================================="
5256 echo "Phase 2: Publishing (atomic)"
5357 echo "========================================="
54- # Compare base SHA with current HEAD (merge commit)
55- ./scripts/validate-packages.sh --execute "$BASE_SHA" "HEAD "
58+ # Hardcoded commits for testing
59+ ./scripts/validate-packages.sh --execute "$BASE_SHA" "$HEAD_SHA "
5660
5761 - name : Create GitHub releases
5862 env :
5963 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60- BASE_SHA : ${{ github.event.pull_request.base.sha }}
64+ BASE_SHA : " 34686ce1e"
65+ HEAD_SHA : " 693f2de24"
6166 run : |
6267 echo ""
6368 echo "========================================="
6469 echo "Phase 3: Creating GitHub releases"
6570 echo "========================================="
6671
67- # Detect packages that were published (compare base SHA with current HEAD)
68- PACKAGES_STRING=$(./scripts/detect-version-changes.sh "$BASE_SHA" "HEAD ")
72+ # Detect packages that were published - hardcoded commits for testing
73+ PACKAGES_STRING=$(./scripts/detect-version-changes.sh "$BASE_SHA" "$HEAD_SHA ")
6974 read -ra PACKAGES <<< "$PACKAGES_STRING"
7075
7176 for pkg in "${PACKAGES[@]}"; do
0 commit comments