3636 Install-Module 7Zip4PowerShell -Force -Verbose
3737
3838 - uses : actions/checkout@v2
39-
39+
4040 - name : Restore NuGet packages
4141 run : nuget restore UnityLauncherPro.sln
4242
@@ -50,23 +50,24 @@ jobs:
5050
5151 - name : Get current date and time
5252 id : datetime
53- run : echo "::set-output name=current_datetime::$(date +'%d/%m/%Y %H:%M')"
53+ run : |
54+ echo "current_datetime=$(date +'%d/%m/%Y %H:%M')" >> $GITHUB_ENV
5455
5556 # Step to get previous tag and commits
5657 - name : Get commits since last release
5758 id : get_commits
58- shell : powershell
59+ shell : bash
5960 run : |
6061 # Get the most recent tag (assuming releases are tagged)
61- $prevTag = git describe --tags --abbrev=0
62- Write-Host "Previous tag: $prevTag "
62+ PREV_TAG=$( git describe --tags --abbrev=0)
63+ echo "Previous tag: $PREV_TAG "
6364
6465 # List commits since last tag
65- $commits = git log $prevTag ..HEAD --pretty=format:"* %s"
66- Write-Host "Commits since last release: $commits "
66+ COMMITS=$( git log $PREV_TAG ..HEAD --pretty=format:"* %s" --no-merges)
67+ echo "Commits since last release: $COMMITS "
6768
68- # Save commits to an environment file to use later
69- echo "commits=$commits " >> $env: GITHUB_ENV
69+ # Save commits to environment file for later use
70+ echo "commits=$COMMITS " >> $GITHUB_ENV
7071
7172 - name : Create Release
7273 id : create_release
7576 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7677 with :
7778 tag_name : ${{github.run_number}}
78- release_name : ${{ steps.datetime.outputs .current_datetime }} (${{ github.run_number }})
79+ release_name : ${{ env .current_datetime }} (${{ github.run_number }})
7980 body : |
8081 Automated Release by GitHub Action CI
8182
0 commit comments