-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (51 loc) · 1.72 KB
/
build.yaml
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
name: Build
on:
workflow_dispatch:
inputs:
beta-version-number:
description: 'To publish a beta version: use the workflow version from the branch you want to publish from and include the beta version number in the box below. For example, a value of `1` will result in a package with a version suffix of `-beta.1`.'
type: string
required: false
push:
branches:
- 'master'
tags-ignore:
- '**'
pull_request:
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
defaults:
run:
shell: pwsh
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Check out code
uses: actions/checkout@v3
- name: Restore
run: .\build.ps1 restore
- name: Build
run: .\build.ps1 build --skip restore
- name: Test
run: .\build.ps1 test --skip build
- name: Publish (Stable)
if: runner.os == 'Windows' && github.repository_owner == 'Faithlife' && github.ref == 'refs/heads/master'
env:
BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: .\build.ps1 publish --skip test
- name: Publish (Beta)
if: runner.os == 'Windows' && github.repository_owner == 'Faithlife' && github.ref != 'refs/heads/master' && github.event.inputs.beta-version-number != ''
env:
BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: .\build.ps1 publish --skip test --version-suffix beta.${{ github.event.inputs.beta-version-number }}