-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (77 loc) · 2.76 KB
/
Copy pathci.yml
File metadata and controls
91 lines (77 loc) · 2.76 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'LICENSE'
- 'README.md'
- '.gitignore'
pull_request:
branches: [ main ]
paths-ignore:
- 'docs/**'
- 'LICENSE'
- 'README.md'
- '.gitignore'
env:
SOLUTION_FILE_PATH: Rivet.sln
BUILD_CONFIGURATION: Release
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Export GitHub Actions cache env (for vcpkg GHA binary cache)
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: aafb8b71554a4590aa5108bdb5005d81d72db6c1
- name: Integrate vcpkg with MSBuild
shell: pwsh
run: vcpkg integrate install
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Build solution (x64 Release)
working-directory: ${{ github.workspace }}
run: |
msbuild `
$env:SOLUTION_FILE_PATH `
/m `
/p:Configuration=$env:BUILD_CONFIGURATION `
/p:Platform=x64
# Script at Scripts/CreatePackage.py creates the RivetPack-{VERSION}.zip file in the build output directory
- name: Run packaging script
working-directory: ${{ github.workspace }}
run: |
python .\Scripts\CreatePackage.py
env:
BUILD_DIR: ${{ github.workspace }}\x64\${{ env.BUILD_CONFIGURATION }}
DATA_DIR: ${{ github.workspace }}\data
- name: Extract version from manifest
id: get_version
run: |
$VERSION = (Get-Content -Path "${{ github.workspace }}\Data\manifest.json" | ConvertFrom-Json).version_number
echo "VERSION=$VERSION" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Extract package for upload
run: |
$VERSION = "${{ steps.get_version.outputs.VERSION }}"
Expand-Archive -Path "${{ github.workspace }}\x64\${{ env.BUILD_CONFIGURATION }}\RivetPack-$VERSION.zip" -DestinationPath "${{ github.workspace }}\x64\${{ env.BUILD_CONFIGURATION }}\RivetPack-Extract"
shell: pwsh
- name: Upload Rivet package artifact
uses: actions/upload-artifact@v4
with:
name: RivetPack-${{ steps.get_version.outputs.VERSION }}
path: ${{ github.workspace }}\x64\${{ env.BUILD_CONFIGURATION }}\RivetPack-Extract\*
if-no-files-found: error