ci: using workflow_call to simplify ci.
This commit is contained in:
44
.github/workflows/pack.yml
vendored
44
.github/workflows/pack.yml
vendored
@@ -3,25 +3,42 @@ name: Pack to NuGet
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
Upload_to_NuGet:
|
||||
description: 'Upload to NuGet'
|
||||
default: true
|
||||
type: boolean
|
||||
Ursa:
|
||||
description: 'Pack Ursa'
|
||||
required: true
|
||||
default: 'true'
|
||||
default: true
|
||||
type: boolean
|
||||
Ursa_Themes_Semi:
|
||||
description: 'Pack Ursa.Themes.Semi'
|
||||
required: true
|
||||
default: 'true'
|
||||
default: true
|
||||
type: boolean
|
||||
PrismExtension:
|
||||
description: 'Pack Prism Extension'
|
||||
required: true
|
||||
default: 'false'
|
||||
default: false
|
||||
type: boolean
|
||||
ReactiveUIExtension:
|
||||
description: 'Pack ReactiveUI Extension'
|
||||
required: true
|
||||
default: 'false'
|
||||
default: false
|
||||
type: boolean
|
||||
workflow_call:
|
||||
inputs:
|
||||
Upload_to_NuGet:
|
||||
type: boolean
|
||||
default: false
|
||||
Ursa:
|
||||
default: true
|
||||
type: boolean
|
||||
Ursa_Themes_Semi:
|
||||
default: true
|
||||
type: boolean
|
||||
PrismExtension:
|
||||
default: false
|
||||
type: boolean
|
||||
ReactiveUIExtension:
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
@@ -32,22 +49,23 @@ jobs:
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Pack Ursa
|
||||
if: ${{ github.event.inputs.Ursa == 'true' }}
|
||||
if: ${{ inputs.Ursa == true }}
|
||||
run: dotnet pack src/Ursa -o nugets
|
||||
|
||||
- name: Pack Ursa.Themes.Semi
|
||||
if: ${{ github.event.inputs.Ursa_Themes_Semi == 'true' }}
|
||||
if: ${{ inputs.Ursa_Themes_Semi == true }}
|
||||
run: dotnet pack src/Ursa.Themes.Semi -o nugets
|
||||
|
||||
- name: Pack Prism Extension
|
||||
if: ${{ github.event.inputs.PrismExtension == 'true' }}
|
||||
if: ${{ inputs.PrismExtension == true }}
|
||||
run: dotnet pack src/Ursa.PrismExtension -o nugets
|
||||
|
||||
- name: Pack ReactiveUI Extension
|
||||
if: ${{ github.event.inputs.ReactiveUIExtension == 'true' }}
|
||||
if: ${{ inputs.ReactiveUIExtension == true }}
|
||||
run: dotnet pack src/Ursa.ReactiveUIExtension -o nugets
|
||||
|
||||
- name: Publish NuGet package
|
||||
- name: Upload to NuGet
|
||||
if: ${{ inputs.Upload_to_NuGet == true }}
|
||||
run: dotnet nuget push "nugets/*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
|
||||
Reference in New Issue
Block a user