Bump version to 0.11.0 #14
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 Fathom | |
| uses: actions/checkout@v4 | |
| - name: Checkout Fathom-UnrealEngine | |
| shell: pwsh | |
| run: git clone --depth 1 --branch ${{ github.ref_name }} https://github.com/Tideshift-Labs/Fathom-UnrealEngine.git ../Fathom-UnrealEngine | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Cache Gradle and JDK toolchain | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~\.gradle\caches | |
| ~\.gradle\wrapper | |
| ~\AppData\Local\gradle-jvm | |
| key: gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle.kts', 'gradle.properties') }} | |
| restore-keys: gradle- | |
| - name: Download build tools | |
| shell: pwsh | |
| run: .\scripts\setup.ps1 | |
| - name: Extract version from tag | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}".TrimStart('v') | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Extract release notes from CHANGELOG | |
| id: changelog | |
| shell: pwsh | |
| run: | | |
| $content = Get-Content CHANGELOG.md -Raw | |
| $escapedVersion = "${{ steps.version.outputs.VERSION }}" -replace '\.', '\.' | |
| $pattern = "(?s)## \[$escapedVersion\][^\r\n]*\r?\n(.+?)(?=\r?\n## |\z)" | |
| if ($content -match $pattern) { | |
| $notes = $Matches[1].Trim() | |
| } else { | |
| $notes = "Release ${{ steps.version.outputs.VERSION }}" | |
| } | |
| # Write to a file for both GitHub Release and Gradle patchPluginXml | |
| $notes | Out-File -FilePath release-notes.txt -Encoding utf8 | |
| - name: Build plugin | |
| shell: pwsh | |
| run: | | |
| .\gradlew.bat buildPlugin "-PPluginVersion=${{ steps.version.outputs.VERSION }}" "-PBuildConfiguration=Release" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: release-notes.txt | |
| files: output/*.zip | |
| - name: Publish to JetBrains Marketplace | |
| shell: pwsh | |
| env: | |
| PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} | |
| run: | | |
| $zip = Get-ChildItem "output/*.zip" | Select-Object -First 1 | |
| if (-not $zip) { | |
| Write-Error "No .zip found in output/" | |
| exit 1 | |
| } | |
| curl.exe --fail-with-body -i ` | |
| -H "Authorization: Bearer $env:PUBLISH_TOKEN" ` | |
| -F "pluginId=30185" ` | |
| -F "file=@$($zip.FullName)" ` | |
| -F "channel=Stable" ` | |
| "https://plugins.jetbrains.com/api/updates/upload" |