release(1.1.2): bump version to 1.1.2 and update changelog #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Restore NuGet packages | |
| run: nuget restore LumiShift.sln | |
| - name: Build Release | |
| run: msbuild LumiShift.sln /p:Configuration=Release /p:Platform="Any CPU" /verbosity:minimal | |
| - name: List build artifacts | |
| shell: pwsh | |
| run: | | |
| Write-Host "=== Searching for build outputs ===" | |
| Get-ChildItem -Recurse -Filter "*.exe" LumiShift/bin/Release/ | ForEach-Object { Write-Host $_.FullName } | |
| Get-ChildItem -Recurse -Filter "*.config" LumiShift/bin/Release/ | ForEach-Object { Write-Host $_.FullName } | |
| - name: Copy exe to staging | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path staging | |
| $exe = Get-ChildItem -Recurse -Filter "LumiShift.exe" LumiShift/bin/Release/ | Select-Object -First 1 | |
| if ($exe) { | |
| Copy-Item $exe.FullName staging/LumiShift.exe | |
| Write-Host "Copied: $($exe.FullName) -> staging/LumiShift.exe" | |
| } else { | |
| Write-Error "LumiShift.exe not found in build output!" | |
| exit 1 | |
| } | |
| - name: Extract version from tag | |
| id: version | |
| shell: bash | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| VERSION="${TAG#v}" | |
| echo "tag=$TAG" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Delete existing release (if any) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| shell: bash | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| # Try to get release ID and delete it | |
| RELEASE=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \ | |
| "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/$TAG") | |
| RELEASE_ID=$(echo "$RELEASE" | jq -r '.id // empty') | |
| if [ -n "$RELEASE_ID" ] && [ "$RELEASE_ID" != "null" ]; then | |
| echo "Deleting existing release $RELEASE_ID for tag $TAG" | |
| curl -s -X DELETE -H "Authorization: token $GITHUB_TOKEN" \ | |
| "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/$RELEASE_ID" | |
| else | |
| echo "No existing release found for tag $TAG" | |
| fi | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: LumiShift ${{ steps.version.outputs.tag }} | |
| draft: false | |
| generate_release_notes: true | |
| files: | | |
| staging/LumiShift.exe |