Delete existing GHA script. #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
tags-ignore: | |
- '**' | |
pull_request: | |
env: | |
DOTNET_NOLOGO: 1 | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
defaults: | |
run: | |
shell: pwsh | |
permissions: | |
contents: write | |
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 | |
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 |