Skip to content

Publishing of Kythera crates #1077

Publishing of Kythera crates

Publishing of Kythera crates #1077

Workflow file for this run

name: Publishing of Kythera crates
on:
workflow_run:
workflows: ["Continuous integration"]
merge_group:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
jobs:
# Job to filter crates to be published
gather_crates:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
crates: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
kythera-actors: actors/Cargo.toml
kythera-common: common/Cargo.toml
kythera-fvm: fvm/Cargo.toml
kythera-lib: lib/Cargo.toml
kythera-cli: cli/Cargo.toml
publish:
name: Publish ${{ matrix.crate }}
runs-on: ubuntu-latest
needs:
- gather_crates
if: ${{ needs.gather_crates.outputs.crates != '[]' && needs.gather_crates.outputs.crates != '' }}
strategy:
max-parallel: 1
fail-fast: false
matrix:
crate: ${{ fromJSON(needs.gather_crates.outputs.crates) }}
steps:
- uses: actions/checkout@v3
# Publication flow should run on merge on the `main` branch
- name: Publish
run: cargo publish -p ${{ matrix.crate }} --token ${{secrets.CARGO_TOKEN}}
if: ${{ github.event_name == 'push' }}