forked from StarMapLoader/StarMap
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.39 KB
/
Copy pathpr-build.yml
File metadata and controls
42 lines (34 loc) · 1.39 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
name: PR Build check
on:
pull_request:
# Re-run the version calculation when labels are added or when new commits are pushed
types: [opened, synchronize, labeled, reopened, edited]
branches: [main, dev]
permissions:
pull-requests: write
contents: read
packages: read
jobs:
preview-build:
# Only run for local PRs
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
env:
DOTNET_VERSION: 9.0
PROJECT: StarMap.Launcher/StarMap.Launcher.csproj
NUGET_SOURCE: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: |
dotnet nuget add source --username "${{ secrets.ORG_PACKAGE_USERNAME }}" --password "${{ secrets.ORG_PACKAGE_TOKEN }}" --store-password-in-clear-text --name github "${{ env.NUGET_SOURCE }}"
dotnet restore ${{ env.PROJECT }}
- name: Build
run: dotnet build ${{ env.PROJECT }} -c Release
# - name: Run tests
# run: dotnet test --no-build --verbosity normal