Skip to content

Commit

Permalink
GITHUB_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
danzuep committed Dec 4, 2023
1 parent 4fb3ec8 commit 81c8595
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
preReleaseLabel: ${{ steps.gitversion.outputs.preReleaseLabel }}
commitDate: ${{ steps.gitversion.outputs.commitDate }}
projectName: ${{ steps.github_repository.outputs.basename }}
projectName: $projectName
projectFiles: ${{ steps.github_repository.outputs.projects }}

steps:
Expand All @@ -38,16 +38,17 @@ jobs:

- name: Get Git repository project name
id: github_repository
run: echo "::set-output name=basename::$(basename '${{ github.repository }}')"
run: echo "projectName=$(basename '${{ github.repository }}')" >> $GITHUB_ENV

- name: List all project files in the directory
shell: bash
run: |
echo "Project name: $projectName"
shopt -s globstar
projects=""
for project in ./**/*.csproj; do
echo "$project"
projects+="::$project"
echo "Project file: $project"
echo "projects+=::$project" >> $GITHUB_ENV
done
# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/setup/usage-examples.md#example-1
Expand All @@ -66,6 +67,10 @@ jobs:
- run: |
echo 'Save the GitVersion outputs to a file.'
echo "${{ steps.gitversion.outputs }}" > version.txt
echo "SEMVER=${{ steps.gitversion.outputs.semVer }}" >> envfile.env
env $(cat envfile.env) >> $GITHUB_ENV
- run: |
echo 'Generate release notes from the Git commit log.'
last_tag=$(git describe --abbrev=0 --tags 2>/dev/null)
if [[ -z "$last_tag" ]]; then
Expand Down

0 comments on commit 81c8595

Please sign in to comment.