File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test Extract Info (TEMP)
2+
3+ # Isolated test of the `extract_info` step from release-please.yaml.
4+ # Contains ONLY the parsing step — no token generation, no tagging, no branch
5+ # creation, no label removal. Safe to run on the fork. Delete after testing.
6+
7+ on :
8+ push :
9+ branches :
10+ - ' test/extract-info'
11+
12+ jobs :
13+ extract :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Extract version and PR number from commit message
17+ id : extract_info
18+ shell : bash
19+ env :
20+ COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
21+ run : |
22+ # Take only the first line to avoid git trailers (e.g. Co-authored-by) breaking $GITHUB_OUTPUT
23+ FIRST_LINE=${COMMIT_MESSAGE%%$'\n'*}
24+ echo "version=$( echo "$FIRST_LINE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
25+ echo "pr_number=$( echo "$FIRST_LINE" | sed 's/.*(\#\([0-9]\+\)).*$/\1/' )" >> $GITHUB_OUTPUT
26+ echo "release_branch=release/v$( echo "$FIRST_LINE" | sed 's/^release: v\([0-9]\+\.[0-9]\+\).*$/\1/' )" >> $GITHUB_OUTPUT
27+
28+ - name : Print parsed outputs
29+ env :
30+ RAW_MESSAGE : ${{ github.event.head_commit.message }}
31+ VERSION : ${{ steps.extract_info.outputs.version }}
32+ PR_NUMBER : ${{ steps.extract_info.outputs.pr_number }}
33+ RELEASE_BRANCH : ${{ steps.extract_info.outputs.release_branch }}
34+ run : |
35+ echo "===== raw commit message (between markers) ====="
36+ echo ">>>${RAW_MESSAGE}<<<"
37+ echo "===== parsed outputs ====="
38+ echo "version = '${VERSION}'"
39+ echo "pr_number = '${PR_NUMBER}'"
40+ echo "release_branch = '${RELEASE_BRANCH}'"
You can’t perform that action at this time.
0 commit comments