Skip to content

Commit

Permalink
feat: Add release workflows for each target with optional builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzypixelz committed Mar 7, 2024
1 parent 699a3a9 commit 2f37bdc
Show file tree
Hide file tree
Showing 28 changed files with 171,849 additions and 46,573 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-crates-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
required: true

jobs:
build-crates-debian:
build:
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build crates (Artifacts)
name: Build crates (Standalone)

on:
workflow_call:
Expand Down Expand Up @@ -37,7 +37,7 @@ on:
required: false

jobs:
build-crates-artifacts:
build:
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
Expand All @@ -57,7 +57,7 @@ jobs:
- { target: x86_64-pc-windows-gnu, os: windows-2019 }
steps:
- id: build
uses: eclipse-zenoh/ci/build-crates-artifacts@main
uses: eclipse-zenoh/ci/build-crates-standalone@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/publish-crates-eclipse.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/publish-crates-github.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:
required: true

jobs:
publish-crates-cargo:
publish:
runs-on: ubuntu-latest
steps:
- uses: eclipse-zenoh/ci/publish-crates-cargo@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,49 @@ on:
live-run:
type: string
required: true
repo:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
no-build:
type: boolean
required: false
default: false
workflow_dispatch:
inputs:
live-run:
type: string
required: true
repo:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
no-build:
type: boolean
required: false
default: false

jobs:
publish-crates-debian:
build:
if: ${{ !inputs.no-build }}
uses: eclipse-zenoh/ci/.github/workflows/build-crates-debian.yml@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: eclipse-zenoh/ci/publish-crates-debian@main
Expand Down
81 changes: 81 additions & 0 deletions .github/workflows/release-crates-eclipse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Publish crates (Eclipse)

on:
workflow_call:
inputs:
repo:
type: string
required: true
live-run:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
artifact-patterns:
type: string
required: true
exclude-builds:
type: string
required: false
name:
type: string
required: true
no-build:
type: boolean
required: false
default: false
workflow_dispatch:
inputs:
repo:
type: string
required: true
live-run:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
artifact-patterns:
type: string
required: true
exclude-builds:
type: string
required: false
name:
type: string
required: true
no-build:
type: boolean
required: false
default: false

jobs:
build:
if: ${{ !inputs.no-build }}
uses: eclipse-zenoh/ci/.github/workflows/build-crates-standalone.yml@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
artifact-patterns: ${{ inputs.artifact-patterns }}
exclude-builds: ${{ inputs.exclude-builds }}

publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: eclipse-zenoh/ci/publish-crates-eclipse@main
with:
live-run: ${{ inputs.live-run }}
version: ${{ inputs.version }}
ssh-host: [email protected]
ssh-host-path: /home/data/httpd/download.eclipse.org/${{ inputs.name }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
84 changes: 84 additions & 0 deletions .github/workflows/release-crates-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Publish crates (GitHub)

on:
workflow_call:
inputs:
repo:
type: string
required: true
live-run:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
artifact-patterns:
type: string
required: true
exclude-builds:
type: string
required: false
no-build:
type: boolean
required: false
default: false
workflow_dispatch:
inputs:
repo:
type: string
required: true
live-run:
type: string
required: true
version:
type: string
required: true
branch:
type: string
required: true
artifact-patterns:
type: string
required: true
exclude-builds:
type: string
required: false
no-build:
type: boolean
required: false
default: false

jobs:
build-standalone:
if: ${{ !inputs.no-build }}
uses: eclipse-zenoh/ci/.github/workflows/build-crates-standalone.yml@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
artifact-patterns: ${{ inputs.artifact-patterns }}
exclude-builds: ${{ inputs.exclude-builds }}

build-debian:
if: ${{ !inputs.no-build }}
uses: eclipse-zenoh/ci/.github/workflows/build-crates-debian.yml@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}

publish:
needs: [build-standalone, build-debian]
runs-on: macos-latest
steps:
- uses: eclipse-zenoh/ci/publish-crates-github@main
with:
repo: ${{ inputs.repo }}
live-run: ${{ inputs.live-run }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
formulae:
type: string
required: true
no-build:
type: boolean
required: false
default: false
workflow_dispatch:
inputs:
repo:
Expand All @@ -41,19 +45,39 @@ on:
formulae:
type: string
required: true
no-build:
type: boolean
required: false
default: false

jobs:
publish-crates-homebrew:
build:
if: ${{ !inputs.no-build }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- uses: eclipse-zenoh/ci/build-crates-standalone@main
with:
repo: ${{ inputs.repo }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
target: ${{ matrix.target }}
artifact-patterns: ${{ inputs.artifact-patterns }}
github-token: ${{ secrets.BOT_TOKEN_WORKFLOW }}

publish:
needs: build
runs-on: macos-latest
steps:
- uses: eclipse-zenoh/ci/publish-crates-homebrew@main
with:
repo: ${{ inputs.repo }}
live-run: ${{ inputs.live-run }}
version: ${{ inputs.version }}
branch: ${{ inputs.branch }}
formulae: ${{ inputs.formulae }}
artifact-patterns: ${{ inputs.artifact-patterns }}
tap: eclipse-zenoh/homebrew-zenoh
ssh-host: [email protected]
ssh-host-path: /home/data/httpd/download.eclipse.org/zenoh/homebrew-tap
Expand Down
Loading

0 comments on commit 2f37bdc

Please sign in to comment.