Skip to content

Commit df31e39

Browse files
committed
workflow now generates a zip
1 parent cfd7e12 commit df31e39

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,22 @@ jobs:
2222
- name: Build
2323
run: cmake --build build --config Release
2424

25+
- name: Stage release bundle
26+
shell: pwsh
27+
run: |
28+
$tag = '${{ github.ref_name }}'
29+
$version = $tag -replace '^v',''
30+
$stage = "ClassicAPI-$tag"
31+
New-Item -ItemType Directory -Force -Path $stage | Out-Null
32+
Copy-Item build/Release/ClassicAPI.dll $stage
33+
Copy-Item -Recurse 'AddOns/!!!ClassicAPI' $stage
34+
# Stamp the addon's TOC version line from the tag (drops the leading `v`)
35+
$toc = Join-Path $stage '!!!ClassicAPI/!!!ClassicAPI.toc'
36+
(Get-Content $toc) -replace '^## Version:.*', "## Version: $version" |
37+
Set-Content $toc
38+
Compress-Archive -Path $stage -DestinationPath "$stage.zip"
39+
2540
- name: Release
2641
uses: softprops/action-gh-release@v2
2742
with:
28-
files: build/Release/ClassicAPI.dll
43+
files: ClassicAPI-${{ github.ref_name }}.zip

0 commit comments

Comments
 (0)