Skip to content

Commit ebc8cd9

Browse files
authored
Refactor build and publish steps in workflow for improved readability (#97)
1 parent e50103a commit ebc8cd9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/build-library-task.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ jobs:
4343
uses: actions/checkout@v6
4444

4545
- name: Build library project step
46-
run: >-
47-
dotnet build ${{ env.PROJECT_FILE }}
48-
--output ${{ runner.temp }}/publish
49-
--configuration ${{ env.IS_MAIN_BRANCH == 'true' && 'Release' || 'Debug' }}
50-
-property:Version=${{ needs.get-version.outputs.AssemblyVersion }}
51-
-property:FileVersion=${{ needs.get-version.outputs.AssemblyFileVersion }}
52-
-property:AssemblyVersion=${{ needs.get-version.outputs.AssemblyVersion }}
53-
-property:InformationalVersion=${{ needs.get-version.outputs.AssemblyInformationalVersion }}
54-
-property:PackageVersion=${{ needs.get-version.outputs.SemVer2 }}
46+
run: |
47+
dotnet build ${{ env.PROJECT_FILE }} \
48+
--output ${{ runner.temp }}/publish \
49+
--configuration ${{ env.IS_MAIN_BRANCH == 'true' && 'Release' || 'Debug' }} \
50+
-property:Version=${{ needs.get-version.outputs.AssemblyVersion }} \
51+
-property:FileVersion=${{ needs.get-version.outputs.AssemblyFileVersion }} \
52+
-property:AssemblyVersion=${{ needs.get-version.outputs.AssemblyVersion }} \
53+
-property:InformationalVersion=${{ needs.get-version.outputs.AssemblyInformationalVersion }} \
54+
-property:PackageVersion=${{ needs.get-version.outputs.SemVer2 }}
5555
5656
- name: Publish to NuGet.org step
5757
if: ${{ inputs.push }}
58-
run: >-
59-
dotnet nuget push ${{ runner.temp }}/publish/*.nupkg
60-
--source https://api.nuget.org/v3/index.json
61-
--api-key ${{ secrets.NUGET_API_KEY }}
58+
run: |
59+
dotnet nuget push ${{ runner.temp }}/publish/*.nupkg \
60+
--source https://api.nuget.org/v3/index.json \
61+
--api-key ${{ secrets.NUGET_API_KEY }} \
6262
--skip-duplicate
6363
6464
- name: Zip output step

0 commit comments

Comments
 (0)