Skip to content

Commit 92a5010

Browse files
authored
Update main.yml test3 #GITBUILD
1 parent 5074651 commit 92a5010

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: .github/workflows/main.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,21 @@ jobs:
5252
id: datetime
5353
run: echo "::set-output name=current_datetime::$(date +'%d/%m/%Y %H:%M')"
5454

55-
# New step to get previous tag and commits
55+
# Step to get previous tag and commits
5656
- name: Get commits since last release
5757
id: get_commits
58+
shell: powershell
5859
run: |
5960
# Get the most recent tag (assuming releases are tagged)
60-
PREV_TAG=$(git describe --tags --abbrev=0)
61-
echo "Previous tag: $PREV_TAG"
61+
$prevTag = git describe --tags --abbrev=0
62+
Write-Host "Previous tag: $prevTag"
6263
6364
# List commits since last tag
64-
COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s")
65-
echo "Commits since last release: $COMMITS"
65+
$commits = git log $prevTag..HEAD --pretty=format:"* %s"
66+
Write-Host "Commits since last release: $commits"
6667
67-
# Save commits to output for use in the release body
68-
echo "::set-output name=commits::${COMMITS}"
68+
# Save commits to an environment file to use later
69+
echo "commits=$commits" >> $env:GITHUB_ENV
6970
7071
- name: Create Release
7172
id: create_release
@@ -79,7 +80,7 @@ jobs:
7980
Automated Release by GitHub Action CI
8081
8182
### Commits in this release:
82-
${{ steps.get_commits.outputs.commits }}
83+
${{ env.commits }}
8384
draft: false
8485
prerelease: false
8586

0 commit comments

Comments
 (0)