Publish job using matrix

Change publish job with matrix, don't fail if another job fail.
This commit is contained in:
Dedy Martadinata S 2023-05-12 20:41:35 +07:00 committed by GitHub
parent e1aa2bfb18
commit 1b2dfbe52e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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' }}