Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release crate check #557

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/crates_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ cargo check -p zenoh-link-udp --manifest-path io/zenoh-links/zenoh-link-udp/Carg
cargo check -p zenoh-link-tcp --manifest-path io/zenoh-links/zenoh-link-tcp/Cargo.toml &&
cargo check -p zenoh-link-tls --manifest-path io/zenoh-links/zenoh-link-tls/Cargo.toml &&
cargo check -p zenoh-link-quic --manifest-path io/zenoh-links/zenoh-link-quic/Cargo.toml &&
cargo check -p zenoh-link-unixpipe --manifest-path io/zenoh-links/zenoh-link-unixpipe/Cargo.toml &&
cargo check -p zenoh-link-unixsock_stream --manifest-path io/zenoh-links/zenoh-link-unixsock_stream/Cargo.toml &&
cargo check -p zenoh-link-serial --manifest-path io/zenoh-links/zenoh-link-serial/Cargo.toml &&
cargo check -p zenoh-link-ws --manifest-path io/zenoh-links/zenoh-link-ws/Cargo.toml &&
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/crates_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ cargo login $1
(cd io/zenoh-links/zenoh-link-tcp && cargo publish)
(cd io/zenoh-links/zenoh-link-tls && cargo publish)
(cd io/zenoh-links/zenoh-link-quic && cargo publish)
(cd io/zenoh-links/zenoh-link-unixpipe && cargo publish)
(cd io/zenoh-links/zenoh-link-unixsock_stream && cargo publish)
(cd io/zenoh-links/zenoh-link-serial && cargo publish)
(cd io/zenoh-links/zenoh-link-ws && cargo publish)
Expand All @@ -28,4 +29,5 @@ cargo login $1
(cd zenohd && cargo publish)
(cd plugins/zenoh-plugin-rest && cargo publish)
(cd plugins/zenoh-backend-traits && cargo publish)
(cd plugins/zenoh-plugin-storage-manager && cargo publish)
(cd plugins/zenoh-plugin-storage-manager && cargo publish)
echo Done
23 changes: 21 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ on:
runtests:
description: "run tests"
type: boolean
publish:
description: "publish"
type: boolean
githubrelease:
description: "publish as github release"
type: boolean
eclipse:
description: "publish to download.eclipse.org/zenoh"
type: boolean
cratesio:
description: "publish to crates.io"
type: boolean
dockerhub:
description: "publish to dockerhub"
type: boolean
Expand Down Expand Up @@ -330,7 +342,7 @@ jobs:

publication:
name: Release publication
if: ${{ needs.checks.outputs.IS_RELEASE == 'true' && !failure() }}
if: ${{ (needs.checks.outputs.IS_RELEASE == 'true' || github.event.inputs.publish == 'true') && !failure() }}
needs: [checks, builds, tests, doc]
runs-on: ubuntu-latest
steps:
Expand All @@ -339,10 +351,12 @@ jobs:
with:
path: ARTIFACTS
- name: Publish as github release
if: ${{ !(github.event.inputs.githubrelease == 'false') }}
uses: softprops/action-gh-release@v1
with:
files: ARTIFACTS/*/*.*
- name: Publish to download.eclipse.org/zenoh
if: ${{ !(github.event.inputs.eclipse == 'false') }}
env:
SSH_TARGET: [email protected]
ECLIPSE_BASE_DIR: /home/data/httpd/download.eclipse.org/zenoh
Expand All @@ -367,13 +381,18 @@ jobs:
ssh-add -D
- uses: actions/checkout@v2
- name: Install Rust toolchain
if: ${{ !(github.event.inputs.cratesio == 'false') }}
run: rustup show
- name: Check crates
if: ${{ !(github.event.inputs.cratesio == 'false') }}
shell: bash
run: .github/workflows/crates_check.sh
- name: Publish to crates.io
if: ${{ !(github.event.inputs.cratesio == 'false') }}
shell: bash
run: .github/workflows/crates_publish.sh ${{ secrets.CRATES_IO_TOKEN }}
run: |
set +x
.github/workflows/crates_publish.sh ${{ secrets.CRATES_IO_TOKEN }}
- name: Cancel workflow if fail # thus Docker job be interrupted
if: failure()
uses: andymckay/[email protected]
Expand Down
66 changes: 33 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading