Skip to content
on:
workflow_call:
inputs:
COALESCE_VERSION:
# If COALESCE_VERSION is provided, the template's dependencies will be updated
# to that version. Otherwise, the template's dependencies will be left alone.
# We pass it in when doing a release after the release assets have been published.
# We ignore it when doing CI builds when assets haven't yet been published.
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: pwsh
working-directory: ./templates/Coalesce.Vue.Template
env:
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
include-prerelease: true
- name: Download Artifacts
if: env.COALESCE_VERSION
uses: actions/download-artifact@v3
with:
name: packages
path: ./local-nuget
- run: dotnet nuget add source "./local-nuget" --name "local-nuget"
if: env.COALESCE_VERSION
- name: "Set dependency versions"
if: env.COALESCE_VERSION
run: |
$filePath = "./content/Directory.Build.props"
$newVersion = "<CoalesceVersion>$env:COALESCE_VERSION</CoalesceVersion>"
(Get-Content $filePath) -replace '<CoalesceVersion>.*?<\/CoalesceVersion>', $newVersion | Set-Content $filePath
cd ./content/*.Web
npm i coalesce-vue@$env:COALESCE_VERSION --save
npm i coalesce-vue-vuetify3@$env:COALESCE_VERSION --save
- name: TestLocal
run: ./TestLocal.ps1
- name: dotnet pack
run: dotnet pack -p:Version=$(!$env:COALESCE_VERSION ? '0.1.0' : $env:COALESCE_VERSION) -p:PackageOutputPath="${{ github.workspace }}/out/packages"

Check failure on line 58 in .github/workflows/part-template-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/part-template-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 58
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: template-packages
path: ${{ github.workspace }}/out/packages