Skip to content

Commit

Permalink
Adjust job conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Oct 19, 2023
1 parent 160a57a commit 33c0e8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
default: false
type: boolean
dry_run:
description: Run package release in "dry run" mode (does not publish)
description: Run package release in "dry run" mode (does not publish either)
default: false
type: boolean
docs_env:
Expand All @@ -24,7 +24,7 @@ jobs:
name: Release from "${{ github.ref_name }}" branch
runs-on: ubuntu-latest
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
if: ${{ inputs.docs_only == 'false' || github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9' }}
if: ${{ !inputs.docs_only && (github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9') }}
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
Expand All @@ -51,7 +51,7 @@ jobs:
docs_release:
name: Publish documentation from "${{ github.ref_name }}" branch to ${{ inputs.docs_env }}
runs-on: ubuntu-latest
if: ${{ inputs.dry_run == 'false' }}
if: ${{ !inputs.dry_run && ((inputs.docs_env == 'production' && github.ref_name == 'master') || (github.ref_name != 'master' && inputs.docs_env == 'staging')) }}
outputs:
target-version: $${{ steps.target-version.outputs }}
steps:
Expand Down

0 comments on commit 33c0e8a

Please sign in to comment.