Skip to content

Commit

Permalink
Update main.yml test3 #GITBUILD
Browse files Browse the repository at this point in the history
  • Loading branch information
unitycoder authored Oct 28, 2024
1 parent 5074651 commit 92a5010
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,21 @@ jobs:
id: datetime
run: echo "::set-output name=current_datetime::$(date +'%d/%m/%Y %H:%M')"

# New step to get previous tag and commits
# Step to get previous tag and commits
- name: Get commits since last release
id: get_commits
shell: powershell
run: |
# Get the most recent tag (assuming releases are tagged)
PREV_TAG=$(git describe --tags --abbrev=0)
echo "Previous tag: $PREV_TAG"
$prevTag = git describe --tags --abbrev=0
Write-Host "Previous tag: $prevTag"
# List commits since last tag
COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s")
echo "Commits since last release: $COMMITS"
$commits = git log $prevTag..HEAD --pretty=format:"* %s"
Write-Host "Commits since last release: $commits"
# Save commits to output for use in the release body
echo "::set-output name=commits::${COMMITS}"
# Save commits to an environment file to use later
echo "commits=$commits" >> $env:GITHUB_ENV
- name: Create Release
id: create_release
Expand All @@ -79,7 +80,7 @@ jobs:
Automated Release by GitHub Action CI
### Commits in this release:
${{ steps.get_commits.outputs.commits }}
${{ env.commits }}
draft: false
prerelease: false

Expand Down

0 comments on commit 92a5010

Please sign in to comment.