Skip to content

Commit d0e9541

Browse files
committed
Update ci.yml
1 parent b0f0825 commit d0e9541

File tree

2 files changed

+37
-39
lines changed

2 files changed

+37
-39
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Continuous Integration
22
on:
33
push:
4+
tags:
5+
- '*'
46
branches:
5-
- master
6-
- ci-test
7+
- '*'
78
paths-ignore:
89
- generator_scripts/**
910
- README.md
@@ -12,12 +13,13 @@ on:
1213
pull_request:
1314
branches:
1415
- master
15-
- ci-test
1616
paths-ignore:
1717
- generator_scripts/**
1818
- README.md
1919
- LICENSE
2020
- .gitignore
21+
permissions:
22+
contents: write
2123
jobs:
2224
build:
2325
strategy:
@@ -112,4 +114,35 @@ jobs:
112114
uses: actions/upload-artifact@v4
113115
with:
114116
name: schemadump-${{ matrix.os_short }}
115-
path: schemadump/build/package
117+
path: schemadump/build/package
118+
release:
119+
name: Release
120+
runs-on: ubuntu-latest
121+
needs: build
122+
if: startsWith(github.ref, 'refs/tags/')
123+
steps:
124+
- name: Download artifacts
125+
uses: actions/download-artifact@v4
126+
127+
- name: Package
128+
run: |
129+
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
130+
oses="linux windows"
131+
sdks="cs2 dota deadlock"
132+
for os in $oses; do
133+
for sdk in $sdks; do
134+
if [ -d "./schemadump-$os/$sdk" ]; then
135+
echo "Packaging $os-$sdk..."
136+
cd ./schemadump-$os/$sdk
137+
zip -r ../../schemadump-$sdk-$os-${version}.zip ./*
138+
cd -
139+
fi
140+
done
141+
done
142+
143+
- name: Release
144+
uses: softprops/action-gh-release@v2
145+
with:
146+
draft: true
147+
files: |
148+
schemadump-*.zip

.github/workflows/release.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)