Skip to content

Bump version to 0.5.0 #5

Bump version to 0.5.0

Bump version to 0.5.0 #5

Workflow file for this run

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: Build plugin
shell: pwsh
run: |
.\gradlew.bat buildPlugin "-PPluginVersion=${{ steps.version.outputs.VERSION }}" "-PBuildConfiguration=Release"
- name: Extract release notes from CHANGELOG
id: changelog
shell: pwsh
run: |
$content = Get-Content CHANGELOG.md -Raw
$pattern = "(?s)## \[${{ steps.version.outputs.VERSION }}\][^\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 to avoid multiline env var issues
$notes | Out-File -FilePath release-notes.txt -Encoding utf8
- 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 -X POST `
-H "Authorization: Bearer $env:PUBLISH_TOKEN" `
-F "file=@$($zip.FullName)" `
-F "channel=Stable" `
"https://plugins.jetbrains.com/plugin/30185/uploadNewVersion"