Skip to content

Commit

Permalink
ci: Set live-run input on schedule runs
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Apr 2, 2024
1 parent 88ed611 commit c49b296
Showing 1 changed file with 25 additions and 16 deletions.
41 changes: 25 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,25 @@ on:
required: false

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
live-run: ${{ github.event_name == 'schedule' && false || inputs.live-run }}
steps:
- run: echo "Setting up inputs..."

tag:
needs: setup
name: Branch, Bump & tag crates
uses: eclipse-zenoh/ci/.github/workflows/branch-bump-tag-crates.yml@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
version: ${{ inputs.version }}
bump-deps-pattern: ${{ inputs.live-run && 'zenoh.*' || '^$' }}
bump-deps-version: ${{ inputs.live-run && inputs.zenoh-version || '' }}
bump-deps-branch: ${{ inputs.live-run && format('release/{0}', inputs.zenoh-version) || '' }}
bump-deps-pattern: ${{ needs.setup.outputs.live-run && 'zenoh.*' || '^$' }}
bump-deps-version: ${{ needs.setup.outputs.live-run && inputs.zenoh-version || '' }}
bump-deps-branch: ${{ needs.setup.outputs.live-run && format('release/{0}', inputs.zenoh-version) || '' }}
secrets: inherit

build-debian:
Expand All @@ -69,43 +78,43 @@ jobs:
secrets: inherit

cargo:
needs: [setup, tag]
name: Publish Cargo crates
needs: tag
uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
branch: ${{ needs.tag.outputs.branch }}
# - In dry-run mode, we need to publish eclipse-zenoh/zenoh before this
# repository, in which case the version of zenoh dependecies are left as
# is and thus point to the main branch of eclipse-zenoh/zenoh.
# - In live-run mode, we assume that eclipse-zenoh/zenoh is already
# published as this workflow can't be responsible for publishing it
unpublished-deps-patterns: ${{ inputs.live-run && '' || 'zenoh.*' }}
unpublished-deps-repos: ${{ inputs.live-run && '' || 'eclipse-zenoh/zenoh' }}
unpublished-deps-patterns: ${{ needs.setup.outputs.live-run && '' || 'zenoh.*' }}
unpublished-deps-repos: ${{ needs.setup.outputs.live-run && '' || 'eclipse-zenoh/zenoh' }}
secrets: inherit

debian:
name: Publish Debian packages
needs: [tag, build-debian]
needs: [setup, tag, build-debian]
uses: eclipse-zenoh/ci/.github/workflows/release-crates-debian.yml@main
with:
no-build: true
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
installation-test: false
secrets: inherit

homebrew:
needs: [setup, tag, build-standalone]
name: Publish Homebrew formulae
needs: [tag, build-standalone]
uses: eclipse-zenoh/ci/.github/workflows/release-crates-homebrew.yml@main
with:
no-build: true
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
version: ${{ needs.tag.outputs.version }}
branch: ${{ needs.tag.outputs.branch }}
artifact-patterns: |
Expand All @@ -116,11 +125,11 @@ jobs:

eclipse:
name: Publish artifacts to Eclipse downloads
needs: [tag, build-standalone]
needs: [setup, tag, build-standalone]
uses: eclipse-zenoh/ci/.github/workflows/release-crates-eclipse.yml@main
with:
no-build: true
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
Expand All @@ -132,11 +141,11 @@ jobs:

github:
name: Publish artifacts to GitHub Releases
needs: [tag, build-standalone]
needs: [setup, tag, build-standalone]
uses: eclipse-zenoh/ci/.github/workflows/release-crates-github.yml@main
with:
no-build: true
live-run: ${{ inputs.live-run }}
live-run: ${{ needs.setup.outputs.live-run }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
Expand Down

0 comments on commit c49b296

Please sign in to comment.