chore: documentation #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |