From 500b8a919815834231c5868d84863a8a5ae82c92 Mon Sep 17 00:00:00 2001 From: Louis <836250617@qq.com> Date: Sat, 17 Feb 2024 23:32:53 +0800 Subject: [PATCH] fix: action --- .github/workflows/publish.yaml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 23285cc..3f7d0ba 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -35,16 +35,15 @@ jobs: - name: login to crates.io run: cargo login ${{ secrets.CRATESIO }} - - name: Publish packages - run: | - PACKAGES=("fav_derive" "fav_core" "fav_utils" "fav_cli") - for PACKAGE in "${PACKAGES[@]}"; do - if [[ "${{ inputs.${PACKAGE} }}" == "true" ]]; then - .github/scripts/publish_test.sh "${PACKAGE}" - if [[ $? -eq 0 ]]; then - .github/scripts/publish.sh "${PACKAGE}" - else - echo "Tests failed for ${PACKAGE}. Skipping publishing." - fi - fi - done + - name: publish fav_derive + if: ${{ inputs.fav_derive }} + run: .github/scripts/publish_test.sh fav_derive && .github/scripts/publish.sh fav_derive + - name: publish fav_core + if: ${{ inputs.fav_core }} + run: .github/scripts/publish_test.sh fav_core && .github/scripts/publish.sh fav_core + - name: publish fav_utils + if: ${{ inputs.fav_utils }} + run: .github/scripts/publish_test.sh fav_utils && .github/scripts/publish.sh fav_utils + - name: publish fav_cli + if: ${{ inputs.fav_cli }} + run: .github/scripts/publish_test.sh fav_cli && .github/scripts/publish.sh fav_cli