Skip to content

Commit 8c727f4

Browse files
updated release patched
1 parent 31efb58 commit 8c727f4

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ jobs:
2020
uses: mathieudutour/github-tag-action@v6.2
2121
with:
2222
github_token: ${{ secrets.GITHUB_TOKEN }}
23+
release_branches: main
24+
default_bump: "patch"
2325

2426
- name: Create a GitHub release
25-
uses: actions/create-release@v1
26-
with:
27-
tag_name: ${{ steps.tag_version.outputs.new_tag }}
28-
release_name: "Release v${{ steps.tag_version.outputs.new_version }}"
29-
body: ${{ steps.tag_version.outputs.changelog }}
3027
env:
3128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
TAG_NAME: ${{ steps.tag_version.outputs.new_tag }}
30+
RELEASE_NAME: "Release v${{ steps.tag_version.outputs.new_version }}"
31+
run: |
32+
gh release create ${{ steps.tag_version.outputs.new_tag }} \
33+
--title "Release v${{ steps.tag_version.outputs.new_version }}" \
34+
--notes "${{ steps.tag_version.outputs.changelog }}"

memory-bank/raw_reflection_log.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
Date: 2025-07-12
3+
TaskRef: "Configure conventional commits for release.yml"
4+
5+
Learnings:
6+
- The `mathieudutour/github-tag-action` supports conventional commits by default for determining the version bump.
7+
- To make the configuration more explicit, the `release_branches` input can be used to specify which branches trigger a release.
8+
- The `default_bump` input sets the version bump level (e.g., "patch", "minor") to be used when no conventional commit messages are found that would trigger a higher-level bump.
9+
10+
Difficulties:
11+
- The user's initial request about versioning (0.0.9 -> 0.1.0) required clarification to distinguish between a fixed versioning rule and a dynamic one based on commit history. Asking for clarification was key.
12+
13+
Successes:
14+
- The workflow is now explicitly configured for conventional commits on the `main` branch, which makes the process clearer for future maintenance.
15+
16+
Improvements_Identified_For_Consolidation:
17+
- When configuring versioning in CI/CD, make the process as explicit as possible in the workflow file.
18+
- For `mathieudutour/github-tag-action`, explicitly setting `release_branches` and `default_bump` improves clarity even if it matches the default behavior.
19+
---
20+
Date: 2025-07-12
21+
TaskRef: "Fix release.yml annotations errors"
22+
23+
Learnings:
24+
- The `set-output` command in GitHub Actions is deprecated.
25+
- A robust alternative to the `actions/create-release` action is to use the `gh` CLI directly for creating releases (`gh release create`).
26+
- This approach avoids dependencies on how third-party actions handle their outputs (e.g., `set-output` vs. environment files).
27+
- The syntax `gh release create <tag> --title <title> --notes <notes>` is effective and uses the GitHub CLI's capabilities well.
28+
29+
Difficulties:
30+
- The GitHub Actions log was slightly misleading, attributing the `set-output` warning to the `Create a GitHub release` step, when the command was actually used in the preceding `mathieudutour/github-tag-action` step. The key was understanding that the warning appears on the consumer of the deprecated output.
31+
32+
Successes:
33+
- The final workflow is cleaner, more modern, and less likely to break due to third-party action changes. It relies on the stable and well-supported `gh` CLI.
34+
35+
Improvements_Identified_For_Consolidation:
36+
- General pattern: When a GitHub Action shows a `set-output` deprecation warning, and the action causing it cannot be updated, consider replacing the consuming action with a direct CLI call (e.g., using `gh`) to decouple the steps.

0 commit comments

Comments
 (0)