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 1f8dbe4 commit 9b2c99f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 23 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ jobs:
- name: Clone this repository
uses: actions/checkout@v4

- name: Install Rust toolchain
run: |
rustup show
rustup component add rustfmt clippy
- name: Install rustup components
run: rustup component add rustfmt clippy

- name: Code format check
run: cargo fmt --check
Expand All @@ -62,11 +60,8 @@ jobs:
- name: Clone this repository
uses: actions/checkout@v4

- name: Install Rust toolchain
run: rustup show

- name: Install nextest
run: cargo install --locked cargo-nextest
run: cargo +stable install --locked cargo-nextest
env:
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

Expand All @@ -83,7 +78,7 @@ jobs:
ASYNC_STD_THREAD_COUNT: 4

doc:
name: Doc generation
name: Generate documentation
needs: checks
runs-on: ubuntu-latest
steps:
Expand All @@ -94,7 +89,7 @@ jobs:
- name: Install Rust toolchain nightly for docs gen
run: rustup toolchain install nightly

- name: generate doc
- name: Run rustdoc using Nightly Rust and Zenoh unstable
# NOTE: force 'unstable' feature for doc generation, as forced for docs.rs build in zenoh/Cargo.toml
run: >
cargo +nightly rustdoc --manifest-path ./zenoh/Cargo.toml --lib --features unstable -j3
Expand Down
43 changes: 30 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,38 @@ 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

jobs:
tag:
name: Bump and tag crates
uses: eclipse-zenoh/ci/.github/workflows/tag-crates.yml@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
version: ${{ inputs.version }}
inter-deps-pattern: zenoh.*
secrets: inherit
name: Branch, bump & tag crates
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
steps:
- id: create-release-branch
uses: eclipse-zenoh/ci/create-release-branch@main
with:
repo: ${{ github.repository }}
live-run: ${{ inputs.live-run || false }}
version: ${{ inputs.version }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

- uses: eclipse-zenoh/ci/bump-crates@main
with:
repo: ${{ github.repository }}
version: ${{ steps.create-release-branch.outputs.version }}
branch: ${{ steps.create-release-branch.outputs.branch }}
bump-deps-pattern: zenoh.*
bump-deps-version: ${{ steps.create-release-branch.outputs.version }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

build-debian:
name: Build Debian packages
Expand All @@ -64,14 +78,13 @@ jobs:
secrets: inherit

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

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

ghcr:
Expand All @@ -169,6 +184,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: zenohd
files: |
Expand All @@ -178,4 +194,5 @@ jobs:
platforms: |
linux/arm64
linux/amd64
licenses: EPL-2.0 OR Apache-2.0
secrets: inherit

0 comments on commit 9b2c99f

Please sign in to comment.