File tree 1 file changed +5
-10
lines changed
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
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - " master"
7
5
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)
12
7
13
8
jobs :
14
9
build :
@@ -66,15 +61,15 @@ jobs:
66
61
- uses : actions/checkout@v3
67
62
name : Checkout the repository
68
63
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)
70
65
- name : Create Release
71
66
id : create_release
72
67
uses : actions/create-release@v1
73
68
env :
74
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Use GITHUB_TOKEN or PAT_TOKEN
69
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75
70
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)
78
73
body : |
79
74
Release notes for version ${{ github.ref_name }}.
80
75
draft : false
You can’t perform that action at this time.
0 commit comments