forked from SubnauticaNitrox/Nitrox
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 1.18 KB
/
Copy pathbuildingPullRequest.yml
File metadata and controls
34 lines (31 loc) · 1.18 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
name: Building Pull Request
on:
workflow_dispatch:
jobs:
setup:
if: github.repository_owner == 'SubnauticaNitrox'
runs-on: [self-hosted, linux]
steps:
- name: Checking out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
build:
needs: setup
runs-on: [self-hosted, linux]
strategy:
matrix:
runtime: [win-x64, win-arm64, linux-x64, linux-arm64, osx-x64, osx-arm64]
steps:
- name: Declare env variables
id: vars
shell: bash
run: |
echo "commit_sha_short=$(echo ${{ github.event.pull_request.head.sha }} | cut -c 1-7)" >> $GITHUB_OUTPUT &&
echo "pr_number=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')" >> $GITHUB_OUTPUT
- name: Build
run: dotnet build Nitrox.Launcher/Nitrox.Launcher.csproj -c Debug -r ${{ matrix.runtime }}
- name: Upload Launcher
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: success()
with:
name: "Launcher_${{ matrix.runtime }}_#${{ steps.vars.outputs.pr_number }}_${{ steps.vars.outputs.commit_sha_short }}"
path: 'Nitrox.Launcher/bin/Debug/net10.0/'