-
Notifications
You must be signed in to change notification settings - Fork 4
108 lines (91 loc) · 2.52 KB
/
build.yaml
File metadata and controls
108 lines (91 loc) · 2.52 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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@v4
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 OpenVROverlayPipe/OpenVROverlayPipe.csproj --configuration Release --runtime win-x64
- name: Publish
run: dotnet publish OpenVROverlayPipe/OpenVROverlayPipe.csproj --no-build --configuration Release -o release
- name: Zip release build
shell: bash
run: |
7z a -tzip "OpenVROverlayPipe_${{github.event.release.tag_name}}.zip" "./release/*"
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: release
path: OpenVROverlayPipe_${{github.event.release.tag_name}}.zip
- name: Restore local tools
run: dotnet tool restore
# - name: Generate TypeScript
# run: dotnet dotnet-typegen generate -p OpenVROverlayPipe
#
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: Types
# path: Types
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
# publishNPM:
# name: Publish NPM Package
# runs-on: ubuntu-latest
# needs: build
#
# steps:
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: Types
#
# - uses: actions/setup-node@v4
# with:
# node-version: '20.x'
# registry-url: 'https://registry.npmjs.org'
#
# - name: Install TypeScript
# run: npm install -g typescript
#
# - name: Build TypeScript
# run: tsc
#
# - run: |
# cd ./dist
# npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}