File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,8 @@ name: cpp_tutorial CI and Release
22
33on :
44 push :
5- branches :
6- - " master"
75 tags :
8- - ' v*.*.*' # Trigger workflow on version tags (e.g., v1.0.0)
9- pull_request :
10- branches :
11- - " master"
6+ - ' v*.*.*' # Only trigger workflow on version tags (e.g., v1.0.0, v1.0.1)
127
138jobs :
149 build :
@@ -66,15 +61,15 @@ jobs:
6661 - uses : actions/checkout@v3
6762 name : Checkout the repository
6863
69- # Step 2: Create a GitHub release using GITHUB_TOKEN or PAT_TOKEN
64+ # Step 2: Create a GitHub release using the version tag (e.g., v1.0.0, v1.0.1)
7065 - name : Create Release
7166 id : create_release
7267 uses : actions/create-release@v1
7368 env :
74- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Use GITHUB_TOKEN or PAT_TOKEN
69+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7570 with :
76- tag_name : ${{ github.ref_name }} # Use the pushed tag as the release tag
77- release_name : Release ${{ github.ref_name }} # Name the release after the tag
71+ tag_name : ${{ github.ref_name }} # Use the pushed version tag as the release tag
72+ release_name : Release ${{ github.ref_name }} # Name the release after the tag (e.g., v1.0.0)
7873 body : |
7974 Release notes for version ${{ github.ref_name }}.
8075 draft : false
You can’t perform that action at this time.
0 commit comments