Skip to content

Commit 0d5a790

Browse files
committed
feat: Add DockerHub & GHCR releases
1 parent 90f81f8 commit 0d5a790

File tree

1 file changed

+75
-42
lines changed

1 file changed

+75
-42
lines changed

.github/workflows/release.yml

+75-42
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
name: Release
1515

1616
on:
17-
push:
18-
branches: ["**"]
1917
schedule:
2018
- cron: "0 0 * * 1-5"
2119
workflow_dispatch:
@@ -50,10 +48,10 @@ jobs:
5048
branch: ${{ needs.tag.outputs.branch }}
5149
secrets: inherit
5250

53-
build-artifacts:
51+
build-standalone:
5452
name: Build executables and libraries
5553
needs: tag
56-
uses: eclipse-zenoh/ci/.github/workflows/build-crates-artifacts.yml@main
54+
uses: eclipse-zenoh/ci/.github/workflows/build-crates-standalone.yml@main
5755
with:
5856
repo: ${{ github.repository }}
5957
version: ${{ needs.tag.outputs.version }}
@@ -65,54 +63,35 @@ jobs:
6563
^zenoh_plugin_(rest|storage_manager)\.dll$
6664
secrets: inherit
6765

68-
# NOTE: This tries to mimic the docs.rs build using rustdoc with a nightly toolchain
69-
build-docs:
70-
name: Doc generation
71-
needs: tag
72-
runs-on: ubuntu-latest
73-
steps:
74-
- name: Clone this repository
75-
uses: actions/checkout@v4
76-
with:
77-
ref: ${{ needs.tag.outputs.version }}
78-
79-
- name: Install Rust toolchain nightly for docs gen
80-
run: rustup toolchain install nightly
81-
82-
- name: generate doc
83-
# NOTE: Enable 'unstable' feature for doc generation, as done for docs.rs build in zenoh/Cargo.toml
84-
run: >
85-
cargo +nightly rustdoc --manifest-path ./zenoh/Cargo.toml --lib --features unstable -j3
86-
-Z rustdoc-map -Z unstable-options -Z rustdoc-scrape-examples
87-
--config build.rustdocflags='["-Z", "unstable-options", "--emit=invocation-specific", "--cap-lints", "warn", "--disable-per-crate-search", "--extern-html-root-takes-precedence"]'
88-
env:
89-
RUSTDOCFLAGS: -Dwarnings
90-
91-
publish-cargo:
66+
cargo:
9267
name: Publish Cargo crates
93-
needs: [tag, build-docs]
94-
uses: eclipse-zenoh/ci/.github/workflows/publish-crates-cargo.yml@main
68+
needs: tag
69+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-cargo.yml@main
9570
with:
9671
repos: ${{ github.repository }}
9772
live-run: ${{ inputs.live-run }}
9873
branch: ${{ needs.tag.outputs.branch }}
9974
inter-deps-pattern: zenoh.*
10075
secrets: inherit
10176

102-
publish-debian:
77+
debian:
10378
name: Publish Debian packages
10479
needs: [tag, build-debian]
105-
uses: eclipse-zenoh/ci/.github/workflows/publish-crates-debian.yml@main
80+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-debian.yml@main
10681
with:
82+
no-build: true
10783
live-run: ${{ inputs.live-run }}
10884
version: ${{ needs.tag.outputs.version }}
85+
repo: ${{ github.repository }}
86+
branch: ${{ needs.tag.outputs.branch }}
10987
secrets: inherit
11088

111-
publish-homebrew:
89+
homebrew:
11290
name: Publish Homebrew formulae
113-
needs: tag
114-
uses: eclipse-zenoh/ci/.github/workflows/publish-crates-homebrew.yml@main
91+
needs: [tag, build-standalone]
92+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-homebrew.yml@main
11593
with:
94+
no-build: true
11695
repo: ${{ github.repository }}
11796
live-run: ${{ inputs.live-run }}
11897
version: ${{ needs.tag.outputs.version }}
@@ -128,21 +107,75 @@ jobs:
128107
zenoh-plugin-storage-manager
129108
secrets: inherit
130109

131-
publish-eclipse:
110+
eclipse:
132111
name: Publish artifacts to Eclipse downloads
133-
needs: tag
134-
uses: eclipse-zenoh/ci/.github/workflows/publish-crates-eclipse.yml@main
112+
needs: [tag, build-standalone]
113+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-eclipse.yml@main
135114
with:
115+
no-build: true
136116
live-run: ${{ inputs.live-run }}
137117
version: ${{ needs.tag.outputs.version }}
118+
repo: ${{ github.repository }}
119+
branch: ${{ needs.tag.outputs.branch }}
120+
artifact-patterns: |
121+
^zenohd(\.exe)?$
122+
^libzenoh_plugin_(rest|storage_manager)\.(dylib|so)$
123+
^zenoh_plugin_(rest|storage_manager)\.dll$
138124
name: zenoh
139125
secrets: inherit
140126

141-
publish-docker:
142-
name: Publish Docker image
143-
needs: tag
144-
uses: ./.github/workflows/publish-docker.yml
127+
github:
128+
name: Publish artifacts to GitHub Releases
129+
needs: [tag, build-standalone]
130+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-github.yml@main
131+
with:
132+
no-build: true
133+
live-run: ${{ inputs.live-run }}
134+
version: ${{ needs.tag.outputs.version }}
135+
repo: ${{ github.repository }}
136+
branch: ${{ needs.tag.outputs.branch }}
137+
artifact-patterns: |
138+
^zenohd(\.exe)?$
139+
^libzenoh_plugin_(rest|storage_manager)\.(dylib|so)$
140+
^zenoh_plugin_(rest|storage_manager)\.dll$
141+
secrets: inherit
142+
143+
dockerhub:
144+
name: Publish container image to DockerHub
145+
needs: [tag, build-standalone]
146+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-dockerhub.yml@main
145147
with:
148+
no-build: true
146149
live-run: ${{ inputs.live-run }}
147150
version: ${{ needs.tag.outputs.version }}
151+
repo: ${{ github.repository }}
152+
tags: "eclipse/zenoh:${{ inputs.version }}"
153+
binary: zenohd
154+
files: |
155+
zenohd
156+
libzenoh_plugin_rest.so
157+
libzenoh_plugin_storage_manager.so
158+
platforms: |
159+
linux/arm64
160+
linux/amd64
161+
secrets: inherit
162+
163+
ghcr:
164+
name: Publish container image to GitHub Container Registry
165+
needs: [tag, build-standalone]
166+
uses: eclipse-zenoh/ci/.github/workflows/release-crates-ghcr.yml@main
167+
with:
168+
no-build: true
169+
live-run: ${{ inputs.live-run }}
170+
version: ${{ needs.tag.outputs.version }}
171+
repo: ${{ github.repository }}
172+
tags: "${{ github.repository }}:${{ inputs.version }}"
173+
binary: zenohd
174+
files: |
175+
zenohd
176+
libzenoh_plugin_rest.so
177+
libzenoh_plugin_storage_manager.so
178+
platforms: |
179+
linux/arm64
180+
linux/amd64
148181
secrets: inherit

0 commit comments

Comments
 (0)