diff --git a/.github/workflows/_build-deploy.yml b/.github/workflows/_build-deploy.yml index 04da3b1..5226242 100644 --- a/.github/workflows/_build-deploy.yml +++ b/.github/workflows/_build-deploy.yml @@ -57,7 +57,7 @@ jobs: shell: pwsh run: | dotnet restore ${{ env.PROJECT_PATH }} - dotnet publish ${{ env.PROJECT_PATH }} /p:Version=${{ inputs.project-version }} -o ${{ inputs.project-output }} --no-restore --nologo + dotnet publish ${{ env.PROJECT_PATH }} /p:Version=${{ inputs.project-version }} -o ${{ inputs.project-output }} --no-restore # https://github.com/actions/upload-pages-artifact - name: Upload GitHub Pages artifact for web diff --git a/.github/workflows/_version.yml b/.github/workflows/_version.yml index c052f51..72580ef 100644 --- a/.github/workflows/_version.yml +++ b/.github/workflows/_version.yml @@ -31,8 +31,8 @@ jobs: majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }} preReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }} commitDate: ${{ steps.gitversion.outputs.commitDate }} - projectName: ${{ steps.metadata.outputs.projectName }} - projectFile: ${{ steps.metadata.outputs.projectFile }} + projectName: ${{ steps.metadata1.outputs.projectName }} + projectFile: ${{ steps.metadata2.outputs.projectFile }} steps: # https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches @@ -54,11 +54,14 @@ jobs: id: gitversion # e.g. steps.gitversion.outputs. uses: gittools/actions/gitversion/execute@v0 - - run: | - echo 'Get the project name.' + - id: metadata1 + run: | + echo 'Get the repository project name.' projectName=$(basename '${{ github.repository }}') - echo "Project name: $projectName" + echo "Repository name: $projectName" echo "projectName=${projectName}" >> $GITHUB_ENV + echo "projectName=${projectName}" >> $GITHUB_OUTPUT + echo "App project name: ${{ inputs.appProjectName }}" - run: | echo "Generate release notes from the Git commit log." @@ -77,13 +80,12 @@ jobs: echo "solutionFile=${solution}" >> version.txt done - - id: metadata + - id: metadata2 shell: bash run: | echo 'Save the main app project file path' - echo "projectName=${projectName}" >> $GITHUB_OUTPUT searchName="$(${{ inputs.appProjectName }})" - for project in ./**/${{ inputs.appProjectName }}.csproj; do + for project in ./**/*.csproj; do echo "Project file: $project" if [[ $project == *"${searchName}"* ]]; then echo "projectFile=${project}" >> $GITHUB_OUTPUT @@ -107,7 +109,7 @@ jobs: echo 'Full Semantic Version: ${{ steps.gitversion.outputs.fullSemVer }}' >> $GITHUB_STEP_SUMMARY echo 'Pre-release Label: ${{ steps.gitversion.outputs.preReleaseLabel }}' >> $GITHUB_STEP_SUMMARY env: - workflowVersion: '${{ steps.metadata.outputs.projectName }} version ${{ steps.gitversion.outputs.semVer }}' + workflowVersion: '${{ steps.metadata1.outputs.projectName }} version ${{ steps.gitversion.outputs.semVer }}' # https://github.com/actions/upload-artifact - name: Upload version artifacts