Skip to content

Commit 3c4f241

Browse files
committed
CI: build every push, release only on tag
Was tag-only. Now builds on every push to any branch, uploading the DLL as a workflow artifact (ClassicAPI-<sha>, ~90-day retention) so pre-release DLLs are downloadable from the run page without cutting a tag. Tag pushes still build + stamp the embedded TOC version + publish the GitHub release. Renamed release.yml -> build.yml to match the broader role.
1 parent 93b4dc5 commit 3c4f241

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Release
1+
name: Build
22

33
on:
44
push:
5-
tags:
6-
- 'v*'
5+
branches: ['**']
6+
tags: ['v*']
77

88
permissions:
99
contents: write
@@ -21,7 +21,11 @@ jobs:
2121
# The DLL bundles AddOns/!!!ClassicAPI/ at build time — see the
2222
# `embed_addon` custom command in CMakeLists.txt and the file-read
2323
# hook in src/addons/Embedded.cpp.
24+
#
25+
# Branch builds skip this — leaves the TOC's literal `## Version: DEV`
26+
# in place so the DLL identifies as a dev build at runtime.
2427
- name: Stamp embedded TOC version
28+
if: startsWith(github.ref, 'refs/tags/v')
2529
shell: pwsh
2630
run: |
2731
$version = '${{ github.ref_name }}' -replace '^v',''
@@ -35,7 +39,19 @@ jobs:
3539
- name: Build
3640
run: cmake --build build --config Release
3741

42+
# Every commit uploads the built DLL as a workflow artifact —
43+
# downloadable from the run page for ~90 days. Lets you grab a
44+
# pre-release DLL without cutting a tag. The `name` includes the
45+
# short SHA so multiple runs in the same branch don't overwrite.
46+
- name: Upload artifact
47+
if: "!startsWith(github.ref, 'refs/tags/v')"
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ClassicAPI-${{ github.sha }}
51+
path: build/Release/ClassicAPI.dll
52+
3853
- name: Release
54+
if: startsWith(github.ref, 'refs/tags/v')
3955
uses: softprops/action-gh-release@v2
4056
with:
4157
files: build/Release/ClassicAPI.dll

0 commit comments

Comments
 (0)