Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
danzuep committed Jan 23, 2024
1 parent dffdf2d commit e4a1ce2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -54,11 +54,14 @@ jobs:
id: gitversion # e.g. steps.gitversion.outputs.<outputName>
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."
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e4a1ce2

Please sign in to comment.