Skip to content

Commit a35521f

Browse files
committed
fix: use cargo publish instead of cargo release
- Replace 'cargo release publish' with 'cargo publish' in validate-packages.sh - cargo-release was removed in commit c7227ba - Revert workflow to use PR event data (not hardcoded commits)
1 parent 17997bd commit a35521f

1 file changed

Lines changed: 8 additions & 17 deletions

File tree

.github/workflows/release-rust.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,11 @@ on:
55
types: [closed]
66
branches:
77
- main
8-
workflow_dispatch:
9-
inputs:
10-
base_sha:
11-
description: 'Base commit SHA'
12-
required: false
13-
default: 'a31725d0de490f83ffc3b51c16d46ab98bef6214'
14-
head_sha:
15-
description: 'Head commit SHA'
16-
required: false
17-
default: 'c448992824d6410e08d07e0af3e41e44b2ec746d'
188

199
jobs:
2010
publish-release:
21-
# Temporarily hardcoded to fix failed release
11+
# Only run on merged release PRs
12+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
2213
runs-on: ubuntu-latest
2314
permissions:
2415
contents: write
@@ -47,8 +38,8 @@ jobs:
4738
4839
- name: Validate packages before publishing
4940
env:
50-
BASE_SHA: a31725d0de490f83ffc3b51c16d46ab98bef6214
51-
HEAD_SHA: c448992824d6410e08d07e0af3e41e44b2ec746d
41+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
42+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
5243
run: |
5344
echo "========================================="
5445
echo "Phase 1: Validation (dry-run)"
@@ -58,8 +49,8 @@ jobs:
5849
- name: Publish packages to crates.io
5950
env:
6051
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
61-
BASE_SHA: a31725d0de490f83ffc3b51c16d46ab98bef6214
62-
HEAD_SHA: c448992824d6410e08d07e0af3e41e44b2ec746d
52+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
53+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
6354
run: |
6455
echo ""
6556
echo "========================================="
@@ -70,8 +61,8 @@ jobs:
7061
- name: Create GitHub releases
7162
env:
7263
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73-
BASE_SHA: a31725d0de490f83ffc3b51c16d46ab98bef6214
74-
HEAD_SHA: c448992824d6410e08d07e0af3e41e44b2ec746d
64+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
65+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
7566
run: |
7667
echo ""
7768
echo "========================================="

0 commit comments

Comments
 (0)