From 1b2dfbe52ef83628ab8c06f09101ab76b94307d8 Mon Sep 17 00:00:00 2001 From: Dedy Martadinata S Date: Fri, 12 May 2023 20:41:35 +0700 Subject: [PATCH] Publish job using matrix Change publish job with matrix, don't fail if another job fail. --- .github/workflows/rust.yml | 41 +++++++------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e522447..159381f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -117,6 +117,10 @@ jobs: name: Publish on crates.io if: ${{ needs.pre_job.outputs.should_skip != 'true' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release' }} needs: pre_job + strategy: + fail-fast: false + matrix: + target: [lldap_auth, lldap, lldap_app, lldap_set_password, lldap_migration_tool] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3.5.2 @@ -124,43 +128,12 @@ jobs: with: toolchain: stable override: true - - name: Publish lldap_auth crate + - name: Publish ${{ matrix.target }} crate uses: katyo/publish-crates@v2 with: - args: -p lldap_auth - dry-run: ${{ github.event_name != 'release' }} - check-repo: ${{ github.event_name != 'pull_request' }} - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - ignore-unpublished-changes: ${{ github.event_name != 'release' }} - - name: Publish lldap crate - uses: katyo/publish-crates@v2 - with: - args: -p lldap - dry-run: ${{ github.event_name != 'release' }} - check-repo: ${{ github.event_name != 'pull_request' }} - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - ignore-unpublished-changes: ${{ github.event_name != 'release' }} - - name: Publish lldap_app crate - uses: katyo/publish-crates@v2 - with: - args: -p lldap_app - dry-run: ${{ github.event_name != 'release' }} - check-repo: ${{ github.event_name != 'pull_request' }} - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - ignore-unpublished-changes: ${{ github.event_name != 'release' }} - - name: Publish lldap_migration_tool crate - uses: katyo/publish-crates@v2 - with: - args: -p lldap_migration_tool - dry-run: ${{ github.event_name != 'release' }} - check-repo: ${{ github.event_name != 'pull_request' }} - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - ignore-unpublished-changes: ${{ github.event_name != 'release' }} - - name: Publish lldap_set_password crate - uses: katyo/publish-crates@v2 - with: - args: -p lldap_set_password + args: -p ${{ matrix.target }} dry-run: ${{ github.event_name != 'release' }} check-repo: ${{ github.event_name != 'pull_request' }} registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} ignore-unpublished-changes: ${{ github.event_name != 'release' }} +