Skip to content

Commit 2da8ef8

Browse files
committed
again
1 parent 42dd0a9 commit 2da8ef8

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Diff for: .github/workflows/docker-build.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ name: cpp_tutorial CI and Release
22

33
on:
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

138
jobs:
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

0 commit comments

Comments
 (0)