Skip to content

Commit

Permalink
fix: Release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Apr 4, 2024
1 parent 35bba42 commit 1c382ef
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,29 @@ on:
inputs:
live-run:
type: boolean
description: If false (or undefined) the workflow runs in dry-run mode (i.e. with no side-effects)
description: Live-run
required: false
default: false
version:
type: string
description: Release number. If undefined, the workflow auto-generates a version using git-describe
description: Release number
required: false
zenoh-version:
type: string
description: Release number of Zenoh. Required in live-run mode and ignored in dry-run mode
description: Zenoh Release number
required: false

jobs:
tag:
name: Bump and tag crates
uses: eclipse-zenoh/ci/.github/workflows/tag-crates.yml@main
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 || false }}
version: ${{ inputs.version }}
inter-deps-pattern: ${{ inputs.live-run && 'zenoh.*' || '^$' }}
inter-deps-version: ${{ inputs.live-run && inputs.zenoh-version || '' }}
bump-deps-version: ${{ inputs.zenoh-version }}
bump-deps-pattern: ${{ inputs.zenoh-version && 'zenoh.*' || '^$' }}
bump-deps-branch: ${{ inputs.zenoh-version && format('release/{0}', inputs.zenoh-version) || '' }}
secrets: inherit

build-debian:
Expand Down Expand Up @@ -69,33 +71,21 @@ jobs:
^zenoh_plugin_ros2dds\.dll$
secrets: inherit

cargo-live-run:
if: ${{ inputs.live-run || false }}
name: Publish Cargo crates (live-run)
cargo:
needs: tag
name: Publish Cargo crates
uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main
with:
repos: ${{ github.repository }}
live-run: true
branch: ${{ needs.tag.outputs.branch }}
inter-deps-pattern: ^$
secrets: inherit

# 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
cargo-dry-run:
if: ${{ !inputs.live-run || true }}
name: Publish Cargo crates (dry-run)
needs: tag
uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main
with:
repos: |
eclipse-zenoh/zenoh
${{ github.repository }}
live-run: false
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
branch: ${{ needs.tag.outputs.branch }}
inter-deps-pattern: zenoh.*
# - 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 || false) && 'zenoh.*' || '' }}
unpublished-deps-repos: ${{ !(inputs.live-run || false) && 'eclipse-zenoh/zenoh' || '' }}
secrets: inherit

debian:
Expand Down Expand Up @@ -170,6 +160,7 @@ jobs:
live-run: ${{ inputs.live-run || false }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
tags: "eclipse/zenoh-plugin-ros2dds:${{ needs.tag.outputs.version }}"
binary: zenoh-bridge-ros2dds
files: |
Expand All @@ -178,6 +169,7 @@ jobs:
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit

ghcr:
Expand All @@ -189,6 +181,7 @@ jobs:
live-run: ${{ inputs.live-run || false }}
version: ${{ needs.tag.outputs.version }}
repo: ${{ github.repository }}
branch: ${{ needs.tag.outputs.branch }}
tags: "${{ github.repository }}:${{ needs.tag.outputs.version }}"
binary: zenoh-bridge-ros2dds
files: |
Expand All @@ -197,4 +190,5 @@ jobs:
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit

0 comments on commit 1c382ef

Please sign in to comment.