Skip to content

Publish XAT

Publish XAT #45

Workflow file for this run

name: Publish XAT
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Generate version
uses: josStorer/get-current-time@v2
id: version-date
with:
format: YYYY.M.D.kmm
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Deploy XAT
run: dotnet publish XAT/XAT.sln /p:DebugType=None /p:DebugSymbols=false /p:PublishProfile=FinalPublish /p:Version=${{ steps.version-date.outputs.formattedTime }}
- name: Download Dalamud
run: |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile latest.zip
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
- name: Deploy XAT Dalamud
run: dotnet publish Dalamud/XAT.Plugin.sln /p:DebugType=None /p:DebugSymbols=false /p:PublishProfile=FinalPublish /p:Version=${{ steps.version-date.outputs.formattedTime }}
- name: Write version into Dalamud json
run: |
$ver = '${{ steps.version-date.outputs.formattedTime }}'
$path = './publish-dalamud/XAT.Plugin.json'
$content = get-content -path $path
$content = $content -replace '1.0.0.0',$ver
set-content -Path $path -Value $content
- name: Zip Standalone Release
uses: TheDoctor0/[email protected]
with:
filename: '../XAT.zip'
directory: './publish-standalone/'
exclusions: '*.pdb* *.xml*'
- name: Zip Dalamud Release
uses: TheDoctor0/[email protected]
with:
filename: '../XAT-Dalamud-Plugin.zip'
directory: './publish-dalamud/'
exclusions: '*.pdb* *.xml*'
- name: Write out Blender version
run: |
$ver = '${{ steps.version-date.outputs.formattedTime }}'
$ver = $ver -replace '\.',','
$path = './Blender/xat_addon/__init__.py'
$new_path = './Blender/xat_addon/__init__.py'
$content = get-content -path $path
$content = $content -replace '1,0,0,0',$ver
set-content -Path $new_path -Value $content
- name: Zip Blender Release
uses: TheDoctor0/[email protected]
with:
filename: '../XAT-Blender-Addon.zip'
directory: './Blender/'
- name: Upload Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "XAT.zip,XAT-Blender-Addon.zip,XAT-Dalamud-Plugin.zip"
name: ${{ steps.version-date.outputs.formattedTime }}
tag: v${{ steps.version-date.outputs.formattedTime }}
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Write out Dalamud version
run: |
$ver = '${{ steps.version-date.outputs.formattedTime }}'
$path = './base_repo.json'
$new_path = './repo.json'
$content = get-content -path $path
$content = $content -replace '1.0.0.0',$ver
set-content -Path $new_path -Value $content
- name: Commit repo.json
run: |
git config --global user.name "Actions User"
git config --global user.email "[email protected]"
git fetch origin main && git fetch origin test && git checkout main
git add repo.json
git commit -m "[CI] Updating versions for ${{ steps.version-date.outputs.formattedTime }}" || true
git push origin main || true