Skip to content

Publish XAT

Publish XAT #47

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: 8.0.x
- name: Deploy XAT
run: dotnet publish XAT/XAT.sln /p:DebugType=None /p:DebugSymbols=false /p:PublishProfile=FinalPublish.pubxml /p:Version=${{ steps.version-date.outputs.formattedTime }}
- name: Zip Standalone Release
uses: TheDoctor0/zip-release@0.6.0
with:
filename: '../XAT.zip'
directory: './publish-standalone/'
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/zip-release@0.6.0
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"
name: ${{ steps.version-date.outputs.formattedTime }}
tag: v${{ steps.version-date.outputs.formattedTime }}
draft: false
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit repo.json
run: |
git config --global user.name "Actions User"
git config --global user.email "actions@github.com"
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