@@ -16,59 +16,57 @@ jobs:
1616 steps :
1717 - name : Checkout repository
1818 uses : actions/checkout@v4
19-
19+
2020 - name : Download main baseline artifact
2121 uses : dawidd6/action-download-artifact@v3
2222 with :
2323 name : c-abi-baseline-main
2424 workflow : check-c-abi.yaml
2525 branch : main
2626 path : baseline/
27-
27+
2828 - name : Archive baseline with release version
2929 uses : actions/upload-artifact@v4
3030 with :
3131 name : c-abi-baseline-${{ github.event.release.tag_name || inputs.version }}
3232 path : baseline/c_abi.json.gz
3333 retention-days : 400 # ~13 months
34-
34+
3535 - name : Commit baseline to repository (for long-term storage)
3636 run : |
3737 git config user.name "github-actions[bot]"
3838 git config user.email "github-actions[bot]@users.noreply.github.com"
39-
39+
4040 # Create a baselines branch if it doesn't exist
4141 git fetch origin baselines:baselines 2>/dev/null || git checkout --orphan baselines
4242 git checkout baselines 2>/dev/null || true
43-
43+
4444 # Copy the baseline file with version name
4545 mkdir -p c-abi-baselines
4646 cp baseline/c_abi.json.gz c-abi-baselines/c_abi_${{ github.event.release.tag_name || inputs.version }}.json.gz
47-
47+
4848 # Commit and push
4949 git add c-abi-baselines/
5050 git commit -m "Archive C ABI baseline for ${{ github.event.release.tag_name || inputs.version }}"
5151 git push origin baselines
5252 env :
5353 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54-
54+
5555 - name : Create release comment
5656 if : github.event_name == 'release'
5757 uses : actions/github-script@v7
5858 with :
5959 script : |
6060 const tagName = context.payload.release.tag_name;
61-
61+
6262 github.rest.repos.createCommitComment({
6363 owner: context.repo.owner,
6464 repo: context.repo.repo,
6565 commit_sha: context.payload.release.target_commitish,
66- body: `✅ C ABI baseline archived for release ${tagName}
67-
68- This baseline has been archived from the main branch and will be available for historical reference.
69-
70- The baseline is stored in :
71- - Artifact : \`c-abi-baseline-${tagName}\` (available for ~13 months)
72- - Branch : \`baselines\` (permanent storage)
73- `
66+ body: |
67+ `✅ C ABI baseline archived for release ${tagName}
68+ This baseline has been archived from the main branch and will be available for historical reference.
69+ The baseline is stored in:
70+ - Artifact: \`c-abi-baseline-${tagName}\` (available for ~13 months)
71+ - Branch: \`baselines\` (permanent storage)`
7472 });
0 commit comments