diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8a1009..a114fd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,24 @@ permissions: security-events: write jobs: + check-label: + runs-on: ubuntu-latest + outputs: + skip-ci: ${{ steps.check.outputs.skip-ci }} + steps: + - name: Check for autorelease label + id: check + run: | + if ${{ contains(github.event.pull_request.labels.*.name, 'autorelease: pending') }}; then + echo "skip-ci=true" >> $GITHUB_OUTPUT + echo "Skipping CI for autorelease PR" + else + echo "skip-ci=false" >> $GITHUB_OUTPUT + fi + build: + needs: check-label + if: needs.check-label.outputs.skip-ci != 'true' runs-on: ${{ matrix.os }} strategy: matrix: @@ -54,6 +71,8 @@ jobs: run: cargo test --workspace --all-features -- --nocapture security-audit: + needs: check-label + if: needs.check-label.outputs.skip-ci != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -68,6 +87,8 @@ jobs: run: cargo audit coverage: + needs: check-label + if: needs.check-label.outputs.skip-ci != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -90,6 +111,8 @@ jobs: fail_ci_if_error: false dependency-scan: + needs: check-label + if: needs.check-label.outputs.skip-ci != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1f200fb..498cf6c 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,8 +14,8 @@ jobs: release: runs-on: ubuntu-latest outputs: - release_created: ${{ steps.publish_release.outputs.release_created }} - tag_name: ${{ steps.publish_release.outputs.tag_name }} + paths_released: ${{ steps.publish_release.outputs.paths_released }} + tag_name: v${{ steps.publish_release.outputs.version }} steps: - name: Checkout uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: build_and_upload: needs: release - if: needs.release.outputs.release_created == 'true' + if: needs.release.outputs.paths_released != '[]' runs-on: ${{ matrix.os }} strategy: matrix: @@ -143,7 +143,7 @@ jobs: create_release: needs: [release, build_and_upload] - if: needs.release.outputs.release_created == 'true' + if: needs.release.outputs.paths_released != '[]' runs-on: ubuntu-latest steps: - name: Download all artifacts