Skip to content

v2023.11.23

v2023.11.23 #1

Workflow file for this run

name: Continuous Delivery - Efyran
on:
release:
types: [published]
env:
PROJECT: "efyran"
jobs:
release:
runs-on: windows-latest
env:
BUNDLE_FILE_NAME: "efyran.zip"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Create Bundle
shell: pwsh
run: |
$excludeDirs = @('.github','.vscode','mq-definitions','broadcast', 'knightlinc')
$releaseDir = $env:PROJECT + "\"
$Directories = Get-ChildItem -Directory "." -Exclude $excludeDirs
function CopyReleaseContents($parentDir, $directories) {
foreach($dir in $directories) {
$currentDir = ($parentDir + $dir.Name + "\")
$childReleaseDir = ($releaseDir + $currentDir)
New-Item -Path $childReleaseDir -ItemType Directory
Copy ($currentDir + "*.lua") $childReleaseDir
$ChildDirectories = Get-ChildItem -Directory $currentDir
CopyReleaseContents ($currentDir+"\") $ChildDirectories
}
}
New-Item -Path $releaseDir -ItemType Directory
Copy "*.lua" $releaseDir
CopyReleaseContents '.\' $Directories
function CopyLib($libDirectory) {
New-Item -Path ($releaseDir + "/" + $libDirectory) -ItemType Directory
Copy ($libDirectory + "/*.lua") ($releaseDir + "/" + $libDirectory)
}
CopyLib("broadcast")
CopyLib("knightlinc")
7z a -tzip $env:BUNDLE_FILE_NAME -r ($env:PROJECT + "/*.lua")
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: efyran.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/marketplace/actions/easy-zip-files