|
18 | 18 | steps: |
19 | 19 | - name: Checkout code |
20 | 20 | uses: actions/checkout@v4 |
21 | | - with: |
22 | | - fetch-depth: 0 # Fetch all history for changelog generation |
23 | 21 |
|
24 | 22 | - name: Set up Python |
25 | 23 | uses: actions/setup-python@v5 |
|
47 | 45 | echo "VERSION=$version" >> $env:GITHUB_OUTPUT |
48 | 46 | echo "Version: $version" |
49 | 47 | |
50 | | - - name: Generate release notes |
51 | | - id: release_notes |
52 | | - run: | |
53 | | - $tag = "v${{ steps.version.outputs.VERSION }}" |
54 | | - |
55 | | - # Get the previous tag |
56 | | - $previousTag = git describe --tags --abbrev=0 HEAD^ 2>$null |
57 | | - |
58 | | - if ($previousTag) { |
59 | | - # Generate commit log between tags |
60 | | - $commits = git log "$previousTag..HEAD" --pretty=format:"- %s (%h)" --no-merges |
61 | | - } else { |
62 | | - # First release - show recent commits |
63 | | - $commits = git log -10 --pretty=format:"- %s (%h)" --no-merges |
64 | | - } |
65 | | - |
66 | | - $releaseNotes = @" |
67 | | - ## What's Changed |
68 | | - |
69 | | - $commits |
70 | | - |
71 | | - **Full Changelog**: https://github.com/${{ github.repository }}/compare/$previousTag...$tag |
72 | | - "@ -replace "`r`n", "`n" |
73 | | - |
74 | | - # Escape for GitHub Actions |
75 | | - $releaseNotes = $releaseNotes -replace '%', '%25' -replace "`n", '%0A' -replace "`r", '%0D' |
76 | | - echo "NOTES=$releaseNotes" >> $env:GITHUB_OUTPUT |
77 | | - |
78 | 48 | - name: Create version info file |
79 | 49 | run: | |
80 | 50 | @" |
|
112 | 82 | dotnet tool install -g vpk |
113 | 83 | vpk download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} |
114 | 84 | vpk pack --packId ChiselPDF --packVersion ${{ steps.version.outputs.VERSION }} --packDir .\dist\ChiselPDF --mainExe ChiselPDF.exe |
115 | | - vpk upload github --repoUrl https://github.com/${{ github.repository }} --publish --releaseName "ChiselPDF ${{ steps.version.outputs.VERSION }}" --tag v${{ steps.version.outputs.VERSION }} --releaseNotes "${{ steps.release_notes.outputs.NOTES }}" --token ${{ secrets.GITHUB_TOKEN }} |
| 85 | + vpk upload github --repoUrl https://github.com/${{ github.repository }} --publish --releaseName "ChiselPDF ${{ steps.version.outputs.VERSION }}" --tag v${{ steps.version.outputs.VERSION }} --token ${{ secrets.GITHUB_TOKEN }} |
0 commit comments