Skip to content

Commit

Permalink
Merge pull request #82 from paulovmr/RHOAIENG-15020-2-v4.2.x
Browse files Browse the repository at this point in the history
RHOAIENG-15020: Add a dry mode option to the Release workflow - Without reusable workflow (#81)
  • Loading branch information
paulovmr authored Oct 30, 2024
2 parents 25eb1ad + 60c11a1 commit 288cc95
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Elyra Release - Build
name: Elyra Release
on:
workflow_call:
schedule:
- cron: "0 4 * * *" # 4am UTC everyday
pull_request:
branches: [ "**" ]
paths:
- ".github/workflows/release*"
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:
type: string
required: true
description: "Tag associated with the release (e.g.: v4.0.0)"
dry_run:
type: boolean
required: true
base_ref:
type: string
required: true
default: true
description: "Indicates if it is a dry run, when artifacts are not published"

env:
FORCE_COLOR: true
Expand All @@ -41,7 +53,7 @@ jobs:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.base_ref }}
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -57,7 +69,7 @@ jobs:
yarn set version ${{ env.YARN_VERSION }}
yarn --version
- name: Check version
if: ${{ !inputs.dry_run && github.repository_owner == 'opendatahub-io' }}
if: ${{ github.repository_owner == 'opendatahub-io' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)) }}
run: |
set -o pipefail
LATEST_TAG=$(git describe --tags --match="v*")
Expand All @@ -70,7 +82,7 @@ jobs:
run: |
make install-prod
- name: Publish package on PyPI
if: ${{ !inputs.dry_run && github.repository_owner == 'opendatahub-io' }}
if: ${{ github.repository_owner == 'opendatahub-io' && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.dry_run)) }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/release_dry_run.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/release_publish.yml

This file was deleted.

0 comments on commit 288cc95

Please sign in to comment.