-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.7 KB
/
Copy pathrelease.yml
File metadata and controls
70 lines (58 loc) · 1.7 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
64
65
66
67
68
69
70
name: Release
on:
push:
tags:
- "v*"
permissions: {}
jobs:
release:
runs-on: windows-2022
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Determine version
id: version
shell: pwsh
env:
GH_REF_NAME: ${{ github.ref_name }}
run: |
$v = $env:GH_REF_NAME -replace '^v', ''
echo "value=$v" >> $env:GITHUB_OUTPUT
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Restore vcpkg binary cache
uses: actions/cache@v5
with:
path: C:\vcpkg-cache
key: vcpkg-${{ hashFiles('vcpkg.json', 'cmake/triplets/**', 'cmake/ports/**') }}
restore-keys: vcpkg-
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: ${{ github.workspace }}/lib/vcpkg
env:
VCPKG_BINARY_SOURCES: "clear;files,C:\\vcpkg-cache,readwrite"
- name: Configure and Build
uses: lukka/run-cmake@v10
with:
configurePreset: release-windows
buildPreset: release-windows
env:
VCPKG_BINARY_SOURCES: "clear;files,C:\\vcpkg-cache,readwrite"
- name: Package
id: package
shell: bash
env:
VERSION: ${{ steps.version.outputs.value }}
run: bash scripts/package.sh --build-dir build/msvc/Release "$VERSION"
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
files: |
${{ steps.package.outputs.zip }}
build/msvc/Release/*.pdb
generate_release_notes: true