Skip to content

Commit

Permalink
Fixing conditions (#368)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above that
includes the Jira Ticket -->

# Description
<!--- Describe your changes in detail -->

# Related Issue\Feature
<!--- Please link to the issue or feature: -->

# How Has This Been Tested
- [ ] All unit tests pass.
- [ ] All integration tests pass.
- [ ] Manual Testing:
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

# Types of changes
<!--- What types of changes does your code introduce? Put an 'x' in all
the boxes that apply: -->
<!-- Note that you can just click these after submission and it will
remember the tick for you -->
- [ ] Docs change
- [ ] Refactoring
- [ ] Dependency upgrade
- [ ] Additional Unit Tests\Integration Tests
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Removed no-longer used code

## Deployment Configuration Changes
- [ ] Requires deployment configuration changes as specified below and
in CHANGELOG.md
<!--- Insert Deployment configuration changes here -->

# Checklist
<!--- Go over all the following points, and put an 'x' in all the boxes
once they are true. -->
<!-- Note that you can just click these after submission and it will
remember the tick for you -->
- [ ] There are no Resharper\static code analysis errors anywhere in the
solution.
- [ ] I have ONLY run a code clean-up on any files I have modified to
make sure they are in the correct format and no others.
- [ ] I have added tests to cover my changes.
- [ ] I have run the code and quickly verified it all works to my
satisfaction.
- [ ] All new/modified code has sufficient logging to be able to
diagnose what is wrong.
- [ ] All new and existing tests passed.
- [ ] All new/modified public interfaces/classes have are documented
with xmldoc comments.
- [ ] Unreleased section of CHANGELOG.md has been updated with details
of this PR.
  • Loading branch information
credfeto authored Oct 26, 2023
2 parents 9a05e73 + 0b6da30 commit c6eeb25
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 78 deletions.
10 changes: 5 additions & 5 deletions .github/actions/build-tools/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ runs:
#### ADD FEEDS
- name: "Dotnet: Add optional nuget feed (NugetCache)"
if: ${{inputs.NUGET_PUBLIC_RESTORE_FEED_CACHE != ''}}
if: inputs.NUGET_PUBLIC_RESTORE_FEED_CACHE != ''
shell: bash
run: |
echo "Adding NugetCache NuGet feed..."
Expand All @@ -117,29 +117,29 @@ runs:
dotnet nuget add source --name nuget.org "${{inputs.NUGET_PUBLIC_RESTORE_FEED}}"
- name: "Dotnet: Add optional nuget feed (Additional1Cache)"
if: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE != ''}}
if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE != ''
shell: bash
run: |
echo "Adding Additional1Cache NuGet feed..."
dotnet nuget add source --name Additional1Cache "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE_CACHE}}"
- name: "Dotnet: Add optional nuget feed (Additional2Cache)"
if: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE != ''}}
if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE != ''
shell: bash
run: |
echo "Adding Additional2Cache NuGet feed..."
dotnet nuget add source --name Additional2Cache "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE}}"
- name: "Dotnet: Add optional nuget feed (Additional1)"
if: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE != ''}}
if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE != ''
shell: bash
run: |
echo "Adding Additional1 NuGet feed..."
dotnet nuget add source --name Additional1 "${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE}}"
- name: "Dotnet: Add optional nuget feed (Additional2)"
if: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE != ''}}
if: inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE != ''
shell: bash
run: |
echo "Adding Additional2 NuGet feed..."
Expand Down
75 changes: 54 additions & 21 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ runs:
[[ (${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true'}}) || steps.check_files.outputs.NPM_EXIST == 'true' ]] && echo 'BUILD_ENV=true' >> "$GITHUB_OUTPUT" || echo 'BUILD_ENV=false' >> "$GITHUB_OUTPUT"
[[ (${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true'}}) || steps.check_files.outputs.NPM_EXIST == 'true' ]] && echo 'BUILD_ENV=true' >> "$GITHUB_OUTPUT" || echo 'BUILD_ENV=false' >> "$GITHUB_OUTPUT"
- if: ${{steps.build_tools.outputs.BUILD_ENV == 'true' && inputs.NUGET_PACK == 'true'}}
- if: |-
steps.build_tools.outputs.BUILD_ENV == 'true' &&
inputs.NUGET_PACK == 'true'
name: "Install Multi-Push Tool"
shell: bash
run: dotnet tool install --local Credfeto.Package.Push
Expand All @@ -184,14 +186,14 @@ runs:
DOTNET_TieredPGO: "1"
- name: "Get Unique Build Number"
if: ${{steps.build_tools.outputs.BUILD_ENV == 'true'}}
if: steps.build_tools.outputs.BUILD_ENV == 'true'
uses: onyxmueller/build-tag-number@v1
id: build-number
with:
token: ${{inputs.GITHUB_TOKEN}}
prefix: github

- if: ${{steps.build_tools.outputs.BUILD_ENV == 'true'}}
- if: steps.build_tools.outputs.BUILD_ENV == 'true'
name: "Set Define Build Version"
shell: bash
run: dotnet buildversion --BuildNumber "${{steps.build-number.outputs.build_number}}"
Expand All @@ -211,25 +213,25 @@ runs:
{ echo "DEPLOY=false"; } >> "$GITHUB_ENV"
- name: "Deploy check - Is main or master"
if: ${{endsWith(env.BUILD_VERSION, '-main') || endsWith(env.BUILD_VERSION, '-master')}}
if: endsWith(env.BUILD_VERSION, '-main') || endsWith(env.BUILD_VERSION, '-master')
shell: bash
run: |
{ echo "DEPLOY=true"; echo "RELEASE=false"; } >> "$GITHUB_ENV"
- name: Deploy check - Is release branch
if: ${{!contains(env.BUILD_VERSION, '-')}}
if: contains(env.BUILD_VERSION, '-') == false
shell: bash
run: |
{ echo "DEPLOY=true"; echo "RELEASE=true"; } >> "$GITHUB_ENV"
- name: "Deploy check - Is Dependabot"
if: ${{(github.actor == 'dependabot[bot]')}}
if: (github.actor == 'dependabot[bot]')
shell: bash
run: |
{ echo "DEPLOY=false"; } >> "$GITHUB_ENV"
- name: "Install Package Builder"
if: ${{steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' }}
if: steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true'
shell: bash
run: dotnet tool install --local FunFair.Content.Packager.Cmd --version ${{inputs.NPM_PRODUCTION_PACKAGER_VERSION}}
env:
Expand All @@ -243,7 +245,7 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Install Package Store Signer"
if: ${{steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' }}
if: steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true'
shell: bash
run: dotnet tool install --local FunFair.Content.PackageSigner.Cmd --version ${{inputs.NPM_PRODUCTION_PACKAGER_VERSION}}
env:
Expand All @@ -257,13 +259,13 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Install Octopus Deploy CLI"
if: ${{steps.build_tools.outputs.BUILD_ENV == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: steps.build_tools.outputs.BUILD_ENV == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''
uses: OctopusDeploy/[email protected]
with:
version: latest

- name: "Create Release Notes"
if: ${{steps.build_tools.outputs.BUILD_ENV == 'true'}}
if: steps.build_tools.outputs.BUILD_ENV == 'true'
shell: bash
run: dotnet changelog --changelog CHANGELOG.md --extract RELEASE_NOTES.md --version "${{env.BUILD_VERSION}}"
env:
Expand All @@ -277,7 +279,7 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Read Release Notes"
if: ${{steps.build_tools.outputs.BUILD_ENV == 'true'}}
if: steps.build_tools.outputs.BUILD_ENV == 'true'
id: release-notes
uses: juliangruber/read-file-action@v1
with:
Expand All @@ -287,7 +289,7 @@ runs:
# DOTNET BUILD
############################################################################################################
- name: "Dotnet: Build"
if: ${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true'}}
if: steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true'
uses: ./.github/actions/dotnet
with:
BUILD_VERSION: ${{env.BUILD_VERSION}}
Expand All @@ -307,7 +309,7 @@ runs:
# NPM BUILD
############################################################################################################
- name: "Npm: Build"
if: ${{steps.check_files.outputs.NPM_EXIST == 'true'}}
if: steps.check_files.outputs.NPM_EXIST == 'true'
uses: ./.github/actions/npm
with:
BUILD_VERSION: ${{env.BUILD_VERSION}}
Expand All @@ -325,7 +327,11 @@ runs:
############################################################################################################

- name: "Dotnet: Push package to Octopus (EXE and DB)"
if: ${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true' && steps.check_files.outputs.SQL_EXIST == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: |-
steps.check_files.outputs.CSPROJ_EXIST == 'true' &&
steps.check_files.outputs.SLN_EXIST == 'true' &&
steps.check_files.outputs.SQL_EXIST == 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != ''
shell: bash
run: octopus package upload --no-prompt --overwrite-mode=ignore --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-win-x64.${{env.BUILD_VERSION}}.zip" --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-x64.${{env.BUILD_VERSION}}.zip" --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-arm64.${{env.BUILD_VERSION}}.zip" --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-database.${{env.BUILD_VERSION}}.zip"
env:
Expand All @@ -334,7 +340,11 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Dotnet: Push package to Octopus (EXE ONLY)"
if: ${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true' && steps.check_files.outputs.SQL_EXIST != 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: |-
steps.check_files.outputs.CSPROJ_EXIST == 'true' &&
steps.check_files.outputs.SLN_EXIST == 'true' &&
steps.check_files.outputs.SQL_EXIST != 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != ''
shell: bash
run: octopus package upload --no-prompt --overwrite-mode=ignore --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-win-x64.${{env.BUILD_VERSION}}.zip" --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-x64.${{env.BUILD_VERSION}}.zip" --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-arm64.${{env.BUILD_VERSION}}.zip"
env:
Expand All @@ -343,7 +353,10 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Dotnet: Push package to Octopus (NPM NUPKG ONLY)"
if: ${{steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: |-
steps.check_files.outputs.NPM_EXIST == 'true' &&
steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != ''
shell: bash
run: octopus package upload --no-prompt --overwrite-mode=ignore --package="${{github.workspace}}/${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-${{env.BUILD_VERSION}}.nupkg"
env:
Expand All @@ -352,7 +365,13 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Dotnet: Create Octopus Release (EXE and DB)"
if: ${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true' && steps.check_files.outputs.SQL_EXIST == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != '' && inputs.OCTOPUS_CHANNEL != '' && env.DEPLOY == 'true'}}
if: |-
steps.check_files.outputs.CSPROJ_EXIST == 'true' &&
steps.check_files.outputs.SLN_EXIST == 'true' &&
steps.check_files.outputs.SQL_EXIST == 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != '' &&
inputs.OCTOPUS_CHANNEL != '' &&
env.DEPLOY == 'true'
shell: bash
run: octopus release create --no-prompt --project="${{inputs.OCTOPUS_PROJECT}}" --version="${{env.BUILD_VERSION}}" --channel="${{inputs.OCTOPUS_CHANNEL}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-win-x64:${{env.BUILD_VERSION}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-x64:${{env.BUILD_VERSION}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-arm64:${{env.BUILD_VERSION}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-database:${{env.BUILD_VERSION}}" --release-notes-file="RELEASE_NOTES.md"
env:
Expand All @@ -361,7 +380,13 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Dotnet: Create Octopus Release (EXE ONLY)"
if: ${{steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true' && steps.check_files.outputs.SQL_EXIST != 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != '' && inputs.OCTOPUS_CHANNEL != '' && env.DEPLOY == 'true'}}
if: |-
steps.check_files.outputs.CSPROJ_EXIST == 'true' &&
steps.check_files.outputs.SLN_EXIST == 'true' &&
steps.check_files.outputs.SQL_EXIST != 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != '' &&
inputs.OCTOPUS_CHANNEL != '' &&
env.DEPLOY == 'true'
shell: bash
run: octopus release create --no-prompt --project="${{inputs.OCTOPUS_PROJECT}}" --version="${{env.BUILD_VERSION}}" --channel="${{inputs.OCTOPUS_CHANNEL}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-win-x64:${{env.BUILD_VERSION}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-x64:${{env.BUILD_VERSION}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}-linux-arm64:${{env.BUILD_VERSION}}" --release-notes-file="RELEASE_NOTES.md"
env:
Expand All @@ -370,7 +395,10 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Dotnet: Create Octopus Release (NPM ONLY)"
if: ${{steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' && inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: |-
steps.check_files.outputs.NPM_EXIST == 'true' &&
steps.check_files.outputs.NPM_SIGNING_EXIST == 'true' &&
inputs.OCTOPUS_DEPLOY_PACKAGE != ''
shell: bash
run: octopus release create --no-prompt --project="${{inputs.OCTOPUS_PROJECT}}" --version="${{env.BUILD_VERSION}}" --channel="${{inputs.OCTOPUS_CHANNEL}}" --package="${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}:${{env.BUILD_VERSION}}" --release-notes-file="RELEASE_NOTES.md"
env:
Expand All @@ -379,7 +407,12 @@ runs:
OCTOPUS_SPACE: "${{inputs.OCTOPUS_SPACE_NAME}}"

- name: "Deploy Octopus Release"
if: ${{((steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true') || (steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true')) && inputs.OCTOPUS_DEPLOY_PACKAGE != '' && inputs.OCTOPUS_CHANNEL != '' && env.DEPLOY == 'true'}}
if: |-
((steps.check_files.outputs.CSPROJ_EXIST == 'true' && steps.check_files.outputs.SLN_EXIST == 'true') ||
(steps.check_files.outputs.NPM_EXIST == 'true' && steps.check_files.outputs.NPM_SIGNING_EXIST == 'true')) &&
inputs.OCTOPUS_DEPLOY_PACKAGE != '' &&
inputs.OCTOPUS_CHANNEL != '' &&
env.DEPLOY == 'true'
shell: bash
run: octopus release deploy --no-prompt --project="${{inputs.OCTOPUS_PROJECT}}" --version="${{env.BUILD_VERSION}}" --environment="${{inputs.OCTOPUS_DEPLOY_TO}}"
env:
Expand All @@ -391,7 +424,7 @@ runs:
# Create GitHub Release
############################################################################################################
- name: "Create Release"
if: ${{steps.build_tools.outputs.BUILD_ENV == 'true' && inputs.CREATE_RELEASE == 'true'}}
if: steps.build_tools.outputs.BUILD_ENV == 'true' && inputs.CREATE_RELEASE == 'true'
id: create_release
uses: ncipollo/release-action@v1
with:
Expand Down
38 changes: 26 additions & 12 deletions .github/actions/dotnet/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ runs:
############################################################################################################

- name: "Dotnet: Define Master build settings"
if: ${{env.Release == 'false'}}
if: env.Release == 'false'
working-directory: ${{github.workspace}}/src
shell: bash
run: echo "DOTNET_RELEASE_DEFINES=/p:IsProduction=false" >> "$GITHUB_ENV"

- name: "Dotnet: Define Release build settings"
if: ${{env.Release == 'false'}}
if: env.Release == 'false'
working-directory: ${{github.workspace}}/src
shell: bash
run: echo "DOTNET_RELEASE_DEFINES=/p:IsProduction=True" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -120,7 +120,7 @@ runs:
# # DATABASE BUILD
# ############################################################################################################
- name: "SQL: Build"
if: ${{inputs.BUILD_SQL == 'true'}}
if: inputs.BUILD_SQL == 'true'
uses: ./.github/actions/sql
with:
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
Expand All @@ -131,7 +131,7 @@ runs:
# Publish ready for deploy to octopus
############################################################################################################
- name: "Dotnet: Pack Packages for Octopus (win-x64)"
if: ${{inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
uses: ./.github/actions/dotnet-publish
with:
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
Expand All @@ -141,7 +141,7 @@ runs:
OCTOPUS_DEPLOY_PACKAGE_ZIP: ${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}

- name: "Dotnet: Pack Packages for Octopus (linux-x64)"
if: ${{inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
uses: ./.github/actions/dotnet-publish
with:
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
Expand All @@ -151,7 +151,7 @@ runs:
OCTOPUS_DEPLOY_PACKAGE_ZIP: ${{inputs.OCTOPUS_DEPLOY_PACKAGE_ZIP}}

- name: "Dotnet: Pack Packages for Octopus (linux-arm64)"
if: ${{inputs.OCTOPUS_DEPLOY_PACKAGE != ''}}
if: inputs.OCTOPUS_DEPLOY_PACKAGE != ''
uses: ./.github/actions/dotnet-publish
with:
BUILD_VERSION: ${{inputs.BUILD_VERSION}}
Expand All @@ -164,7 +164,7 @@ runs:
# DOTNET PUSH TO NUGET
############################################################################################################
- name: "Dotnet: Pack tool"
if: ${{inputs.NUGET_PACK == 'true'}}
if: inputs.NUGET_PACK == 'true'
working-directory: ${{github.workspace}}/src
shell: bash
run: dotnet pack --configuration Release "/p:Version=${{inputs.BUILD_VERSION}}" --no-restore -nodeReuse:False -p:NoWarn=MSB4241
Expand All @@ -180,7 +180,7 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Dotnet: Copy packed to dist"
if: ${{inputs.NUGET_PACK == 'true'}}
if: inputs.NUGET_PACK == 'true'
shell: bash
run: |
shopt -s globstar
Expand All @@ -189,7 +189,11 @@ runs:
working-directory: ${{github.workspace}}/src

- name: "Dotnet: Publish Packages to Nuget (Without separate symbol feed)"
if: ${{inputs.NUGET_API_KEY != '' && inputs.NUGET_API_KEY != 'SLEET' && inputs.NUGET_PACK == 'true' && (inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')}}
if: |-
inputs.NUGET_API_KEY != '' &&
inputs.NUGET_API_KEY != 'SLEET' &&
inputs.NUGET_PACK == 'true' &&
(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')
shell: bash
run: dotnet pushpackages --folder dist --api-key "${{inputs.NUGET_API_KEY}}" --source ${{inputs.NUGET_FEED}}
env:
Expand All @@ -203,7 +207,11 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Dotnet: Publish Packages to Nuget (With separate symbol feed)"
if: ${{inputs.NUGET_API_KEY != '' && inputs.NUGET_API_KEY != 'SLEET' && inputs.NUGET_PACK == 'true' && !(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')}}
if: |-
inputs.NUGET_API_KEY != '' &&
inputs.NUGET_API_KEY != 'SLEET' &&
inputs.NUGET_PACK == 'true' &&
!(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')
shell: bash
run: dotnet pushpackages --folder dist --api-key "${{inputs.NUGET_API_KEY}}" --source ${{inputs.NUGET_FEED}} --symbol-source ${{inputs.NUGET_SYMBOL_FEED}}
env:
Expand All @@ -217,15 +225,21 @@ runs:
DOTNET_TieredPGO: "1"

- name: "Dotnet: Publish Packages Generate Sleet Config"
if: ${{inputs.NUGET_API_KEY == 'SLEET' && inputs.NUGET_PACK == 'true' && !(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')}}
if: |-
inputs.NUGET_API_KEY == 'SLEET' &&
inputs.NUGET_PACK == 'true' &&
!(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')
uses: joutvhu/write-file@v1
with:
path: sleet.json
contents: ${{ inputs.SLEET_CONFIG }}
write_mode: overwrite

- name: "Dotnet: Publish Packages to Nuget (Using Sleet)"
if: ${{inputs.NUGET_API_KEY == 'SLEET' && inputs.NUGET_PACK == 'true' && !(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')}}
if: |-
inputs.NUGET_API_KEY == 'SLEET' &&
inputs.NUGET_PACK == 'true' &&
!(inputs.NUGET_SYMBOL_FEED == '' || inputs.NUGET_SYMBOL_FEED == ' ')
shell: bash
run: dotnet sleet push "${{github.workspace}}/dist" --config sleet.json --source ${{inputs.SLEET_FEED}}
env:
Expand Down
Loading

0 comments on commit c6eeb25

Please sign in to comment.