You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/.github/workflows/reusable-build.yml

55 lines
1.4 KiB

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
on:
workflow_call:
inputs:
platform:
type: string
required: true
runtime:
type: string
required: true
publish-args:
type: string
skip-test:
type: boolean
env:
dotnetVersion: "7.0.x"
jobs:
build:
name: Build, Test, Smoke
# Windows version info missing? See this:
# https://github.com/dotnet/runtime/issues/3828
runs-on: ${{ inputs.platform }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone for GitVersion
- name: Setup .NET Core SDK ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnetVersion }}
- name: Test
if: endsWith(inputs.runtime, 'x64') && !inputs.skip-test
run: dotnet test src -c Release --logger GitHubActions
- name: Publish
shell: pwsh
run: |
ci/Publish.ps1 -Runtime ${{ inputs.runtime }} ${{ inputs.publish-args }}
- name: Smoke
if: endsWith(inputs.runtime, 'x64') && !inputs.skip-test
shell: pwsh
run: ci/SmokeTest.ps1 publish/${{ inputs.runtime }}/recyclarr
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.runtime }}
path: publish/${{ inputs.runtime }}/*