36
36
Install-Module 7Zip4PowerShell -Force -Verbose
37
37
38
38
- uses : actions/checkout@v2
39
-
39
+
40
40
- name : Restore NuGet packages
41
41
run : nuget restore UnityLauncherPro.sln
42
42
@@ -50,23 +50,24 @@ jobs:
50
50
51
51
- name : Get current date and time
52
52
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
54
55
55
56
# Step to get previous tag and commits
56
57
- name : Get commits since last release
57
58
id : get_commits
58
- shell : powershell
59
+ shell : bash
59
60
run : |
60
61
# 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 "
63
64
64
65
# 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 "
67
68
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
70
71
71
72
- name : Create Release
72
73
id : create_release
75
76
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
77
with :
77
78
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 }})
79
80
body : |
80
81
Automated Release by GitHub Action CI
81
82
0 commit comments