Skip to content

Commit

Permalink
chore: updated push sdk to NuGet workflow on WebApiClient changes (#1944
Browse files Browse the repository at this point in the history
)

<!--- Provide a general summary of your changes in the Title above -->

## Description

WebApiClient NuGet is now also pushed on changes in the WebApiClient not
only on schema changes

## Related Issue(s)

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
  • Loading branch information
Fargekritt authored Feb 24, 2025
1 parent 757f454 commit b7186ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
publish-sdk-to-nuget:
uses: ./.github/workflows/workflow-publish-nuget.yml
needs: [ deploy-apps, get-current-version, generate-git-short-sha, check-for-changes ]
if: ${{ always() && !failure() && !cancelled() && needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }}
if: ${{ always() && !failure() && !cancelled() && ( needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasWebApiClientChanges == 'true' ) }}
with:
version: ${{ needs.get-current-version.outputs.version }}-rc.${{ needs.generate-git-short-sha.outputs.gitShortSha }}
path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
publish-sdk-to-nuget:
uses: ./.github/workflows/workflow-publish-nuget.yml
needs: [ deploy-apps, check-for-changes ]
if: ${{ always() && !failure() && !cancelled() && needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }}
if: ${{ always() && !failure() && !cancelled() && ( needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasWebApiClientChanges == 'true' ) }}
with:
version: ${{ inputs.version }}
path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
publish-sdk-to-nuget:
uses: ./.github/workflows/workflow-publish-nuget.yml
needs: [ deploy-apps, check-for-changes ]
if: ${{ always() && !failure() && !cancelled() && needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' }}
if: ${{ always() && !failure() && !cancelled() && ( needs.check-for-changes.outputs.hasSwaggerSchemaChanges == 'true' || needs.check-for-changes.outputs.hasWebApiClientChanges == 'true' )}}
with:
version: ${{ github.event.client_payload.version }}-rc
path: 'src/Digdir.Library.Dialogporten.WebApiClient/Digdir.Library.Dialogporten.WebApiClient.csproj'
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/workflow-check-for-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ on:
hasBackendChanges:
description: "Backend related files changed"
value: ${{ jobs.check-for-changes.outputs.hasBackendChanges }}
hasWebApiClientChanges:
description: "WebApiClient related files changed"
value: ${{ jobs.check-for-changes.outputs.hasWebApiClientChanges }}
hasTestChanges:
description: "Test related files changed"
value: ${{ jobs.check-for-changes.outputs.hasTestChanges }}
Expand Down Expand Up @@ -48,6 +51,7 @@ jobs:
hasSwaggerSchemaChanges: ${{ steps.filter-backend.outputs.swagger_schema_any_modified == 'true'}}
hasGqlSchemaChanges: ${{ steps.filter-backend.outputs.gql_schema_any_modified == 'true'}}
hasMigrationChanges: ${{ steps.filter-backend.outputs.migration_any_modified == 'true'}}
hasWebApiClientChanges: ${{ steps.filter-backend.outputs.web_api_client_modified == 'true'}}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -79,6 +83,8 @@ jobs:
- '.azure/modules/containerApp/**/*'
tests:
- 'tests/**/*'
web_api_client:
- 'src/Digdir.Library.Dialogporten.WebApiClient/**/*'
swagger_schema:
- 'docs/schema/V1/swagger.verified.json'
gql_schema:
Expand Down

0 comments on commit b7186ba

Please sign in to comment.