forked from BonneCW/GD3D11
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build Pipeline updated. Single zip for everything but Spacer_NET
- Loading branch information
Showing
7 changed files
with
100 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Release Spacer_NET | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set tag and directory name env | ||
run: | | ||
$tagName = $Env:GITHUB_REF -replace 'refs/tags/', '' | ||
$dirName = "Gothic2-GD3D11-${tagName}_SpacerNET" | ||
echo "Tag: ${tagName}" | ||
echo "Directory: ${dirName}" | ||
echo "RELEASE_VERSION=${tagName}" >> $Env:GITHUB_ENV | ||
echo "RELEASE_DIR=${dirName}" >> $Env:GITHUB_ENV | ||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Restore NuGet packages | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: nuget restore . | ||
|
||
- name: Build | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: msbuild /p:Configuration=Spacer_NET . | ||
|
||
- name: Create distribution zip | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: | | ||
mkdir "${{env.RELEASE_DIR}}\GD3D11\shaders\CSFFT" | ||
Xcopy "D3D11Engine\Shaders\*" "${{env.RELEASE_DIR}}\GD3D11\shaders" /s | ||
copy "D3D11Engine\CSFFT\*.hlsl" "${{env.RELEASE_DIR}}\GD3D11\shaders\CSFFT" | ||
Xcopy "blobs\data" "${{env.RELEASE_DIR}}\GD3D11\data\" /s | ||
Xcopy "blobs\Meshes" "${{env.RELEASE_DIR}}\GD3D11\Meshes\" /s | ||
Xcopy "blobs\Textures" "${{env.RELEASE_DIR}}\GD3D11\Textures\" /s | ||
Xcopy "blobs\libs\*" "${{env.RELEASE_DIR}}\" /s | ||
copy "Spacer_NET\ddraw.dll" "${{env.RELEASE_DIR}}" | ||
cd "${{env.RELEASE_DIR}}" | ||
7z a -tzip "..\${{env.RELEASE_DIR}}.zip" -r | ||
- name: Calculate distribution zip hash | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: | | ||
(Get-FileHash "${{env.RELEASE_DIR}}.zip" -Algorithm SHA256).hash | Out-File -FilePath "${{env.RELEASE_DIR}}.zip.sha256" | ||
type "${{env.RELEASE_DIR}}.zip.sha256" | ||
- name: Create github release | ||
run: | | ||
gh release create ${{env.RELEASE_VERSION}} -n "Generated release from GitHub Actions" | ||
echo "Ignore 'Validation Failed' results. Expected since only the first job that reaches this step can create the release." | ||
exit 0 | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
- name: Upload artifacts to github release | ||
run: | | ||
gh release upload ${{env.RELEASE_VERSION}} "${{env.RELEASE_DIR}}.zip" | ||
gh release upload ${{env.RELEASE_VERSION}} "${{env.RELEASE_DIR}}.zip.sha256" | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.