Skip to content

Commit

Permalink
Add github release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BOLL7708 committed Jun 8, 2024
1 parent 0be692d commit 95075a3
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build & Release

on:
release:
types: [ published ]

jobs:
build:
name: Build
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
dotnet-quality: ga

- name: Install OpenVR Dependencies
shell: cmd
run: |
call cd EasyOpenVR
call download_openvr_api_dependencies.cmd
- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build OpenVRStartup/OpenVRStartup.csproj --configuration Release --runtime win-x64

- name: Publish
run: dotnet publish OpenVRStartup/OpenVRStartup.csproj --no-build --configuration Release -o release

- name: Zip release build
shell: bash
run: |
7z a -tzip "OpenVRStartup_${{github.event.release.tag_name}}.zip" "./release/*"
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: release
path: OpenVRStartup_${{github.event.release.tag_name}}.zip

release:
name: Upload Release
runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: release

- name: Display structure of downloaded files
run: ls -R .

- name: Upload file to release
uses: softprops/action-gh-release@v2
with:
files: |
**/*.zip

0 comments on commit 95075a3

Please sign in to comment.