|
21 | 21 | steps: |
22 | 22 | - name: Check Commit and Install 7Zip PowerShell Module |
23 | 23 | shell: powershell |
24 | | - |
25 | 24 | run: | |
26 | 25 | # cancel early, if not build commit |
27 | 26 | $strVal ='${{ github.event.commits[0].message }}' |
|
35 | 34 | exit(1) |
36 | 35 | } |
37 | 36 | Install-Module 7Zip4PowerShell -Force -Verbose |
| 37 | +
|
38 | 38 | - uses: actions/checkout@v2 |
39 | 39 |
|
40 | 40 | - name: Restore NuGet packages |
|
51 | 51 | - name: Get current date and time |
52 | 52 | id: datetime |
53 | 53 | run: echo "::set-output name=current_datetime::$(date +'%d/%m/%Y %H:%M')" |
54 | | - |
| 54 | + |
| 55 | + # New step to get previous tag and commits |
| 56 | + - name: Get commits since last release |
| 57 | + id: get_commits |
| 58 | + run: | |
| 59 | + # Get the most recent tag (assuming releases are tagged) |
| 60 | + PREV_TAG=$(git describe --tags --abbrev=0) |
| 61 | + echo "Previous tag: $PREV_TAG" |
| 62 | + |
| 63 | + # List commits since last tag |
| 64 | + COMMITS=$(git log $PREV_TAG..HEAD --pretty=format:"* %s") |
| 65 | + echo "Commits since last release: $COMMITS" |
| 66 | + |
| 67 | + # Save commits to output for use in the release body |
| 68 | + echo "::set-output name=commits::${COMMITS}" |
| 69 | +
|
55 | 70 | - name: Create Release |
56 | 71 | id: create_release |
57 | 72 | uses: actions/create-release@latest |
|
62 | 77 | release_name: ${{ steps.datetime.outputs.current_datetime }} (${{ github.run_number }}) |
63 | 78 | body: | |
64 | 79 | Automated Release by GitHub Action CI |
| 80 | +
|
| 81 | + ### Commits in this release: |
| 82 | + ${{ steps.get_commits.outputs.commits }} |
65 | 83 | draft: false |
66 | 84 | prerelease: false |
67 | 85 |
|
|
75 | 93 | asset_path: ./UnityLauncherPro.zip |
76 | 94 | asset_name: UnityLauncherPro.zip |
77 | 95 | asset_content_type: application/zip |
78 | | - |
|
0 commit comments