-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (55 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
63 lines (55 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: project
on: push
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
- name: Get DateTime
id: datetime
run: |
$datetime = Get-Date -Format "yyyyMMdd-HHmmss"
echo "datetime=$datetime" >> $env:GITHUB_OUTPUT
- name: Get Repository
id: repository
run: |
$repository = Split-Path -Leaf $env:GITHUB_REPOSITORY
echo "repository=$repository" >> $env:GITHUB_OUTPUT
- name: Build x86
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -A Win32 -B "x86" ..
cmake --build x86 --config Release
- name: Build x64
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=Release -A X64 -B "x64" ..
cmake --build x64 --config Release
- name: Create ZIP
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
id: compress
run: |
$datetime = "${{steps.datetime.outputs.datetime}}"
echo "[+] now is $datetime"
Compress-Archive -Path "build\x86\Release\*.dll","build\x86\Release\*.pdb" -DestinationPath "${{ steps.repository.outputs.repository }}-${{ steps.datetime.outputs.datetime }}-x86.zip"
Compress-Archive -Path "build\x64\Release\*.dll","build\x64\Release\*.pdb" -DestinationPath "${{ steps.repository.outputs.repository }}-${{ steps.datetime.outputs.datetime }}-x64.zip"
- name: Create Release
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
id: release
uses: softprops/action-gh-release@v1
with:
tag_name: autotag-${{ steps.datetime.outputs.datetime }}
generate_release_notes: true
draft: false
prerelease: false
token: ${{ secrets.GIT_TOKEN }}
files: |
${{ steps.repository.outputs.repository }}-${{ steps.datetime.outputs.datetime }}-x86.zip
${{ steps.repository.outputs.repository }}-${{ steps.datetime.outputs.datetime }}-x64.zip