Skip to content

Commit 7b13068

Browse files
committed
chore(workflows): add auto releases on tag push
1 parent 11973e1 commit 7b13068

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build CS2RemoteConsole
33
on:
44
push:
55
branches: [ master ]
6+
tags:
7+
- 'v*'
68
paths:
79
- 'libvconsole/**'
810
- 'CS2RemoteConsole-client/**'
@@ -135,3 +137,30 @@ jobs:
135137
with:
136138
name: CS2RemoteConsole-server-${{ matrix.os_name }}
137139
path: artifact-server
140+
141+
release:
142+
needs: build
143+
runs-on: ubuntu-latest
144+
if: startsWith(github.ref, 'refs/tags/v')
145+
permissions:
146+
contents: write
147+
148+
steps:
149+
- name: Download all artifacts
150+
uses: actions/download-artifact@v4
151+
with:
152+
path: artifacts
153+
154+
- name: Create release archives
155+
run: |
156+
cd artifacts
157+
for dir in */; do
158+
name="${dir%/}"
159+
zip -r "../${name}.zip" "$dir"
160+
done
161+
162+
- name: Create GitHub Release
163+
uses: softprops/action-gh-release@v2
164+
with:
165+
files: "*.zip"
166+
generate_release_notes: true

0 commit comments

Comments
 (0)