forked from SubnauticaNitrox/Nitrox
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.1 KB
/
buildingPullRequest.yml
File metadata and controls
33 lines (30 loc) · 1.1 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
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
build:
needs: setup
runs-on: [self-hosted, linux]
strategy:
matrix:
runtime: [win-x64, linux-x64, linux-arm64]
steps:
- name: Declare env variables
shell: bash
run: |
echo "COMMIT_SHA_SHORT=$(echo ${{ github.event.pull_request.head.sha }} | cut -c 1-7)" >> $GITHUB_ENV &&
echo "PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')" >> $GITHUB_ENV
- name: Build
run: dotnet build Nitrox.Launcher/Nitrox.Launcher.csproj -c Debug -r ${{ matrix.runtime }}
- name: Upload Launcher
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
if: success()
with:
name: "Launcher_${{ matrix.runtime }}_#${{ env.PR_NUMBER }}_${{ env.COMMIT_SHA_SHORT }}"
path: 'Nitrox.Launcher/bin/Debug/net9.0/'