From a486769e1f7ded72f7c3126422836687c73d72eb Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 31 Mar 2026 18:03:58 +0800 Subject: [PATCH 1/3] ci: scope release workflows to version tags --- .github/workflows/release_dart.yml | 2 +- .github/workflows/release_python.yml | 2 +- .github/workflows/release_rust.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_dart.yml b/.github/workflows/release_dart.yml index afac52c2965a..5660aa7efc40 100644 --- a/.github/workflows/release_dart.yml +++ b/.github/workflows/release_dart.yml @@ -22,7 +22,7 @@ name: Release Dart Binding on: push: tags: - - "*" + - "v*" pull_request: branches: - main diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 2d6bdb844868..e0a785ed3f9c 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -20,7 +20,7 @@ name: Release Python Binding on: push: tags: - - "*" + - "v*" pull_request: branches: - main diff --git a/.github/workflows/release_rust.yml b/.github/workflows/release_rust.yml index fefab0605bc5..7e7f6a74be10 100644 --- a/.github/workflows/release_rust.yml +++ b/.github/workflows/release_rust.yml @@ -22,7 +22,7 @@ name: Release Rust Packages on: push: tags: - - "*" + - "v*" pull_request: branches: - main From 9b9911f659d902dbd398b93f548d57ac8f943697 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 31 Mar 2026 18:47:01 +0800 Subject: [PATCH 2/3] ci: skip release jobs during PR workflow validation --- .github/workflows/release_dart.yml | 10 ++++++++++ .github/workflows/release_python.yml | 11 +++++++++++ .github/workflows/release_rust.yml | 9 +++++++++ 3 files changed, 30 insertions(+) diff --git a/.github/workflows/release_dart.yml b/.github/workflows/release_dart.yml index 5660aa7efc40..60fd5198b9b1 100644 --- a/.github/workflows/release_dart.yml +++ b/.github/workflows/release_dart.yml @@ -38,7 +38,16 @@ permissions: contents: read jobs: + validate: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Validate workflow definition + run: ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release_dart.yml")' + build: + if: github.event_name != 'pull_request' runs-on: ${{ matrix.os }} strategy: matrix: @@ -92,6 +101,7 @@ jobs: path: bindings/dart/rust/target/${{ matrix.target }}/release/*opendal* combine-artifacts: + if: github.event_name != 'pull_request' needs: build runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index e0a785ed3f9c..faf3959f9108 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -36,7 +36,16 @@ permissions: contents: read jobs: + validate: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Validate workflow definition + run: ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release_python.yml")' + sdist: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -52,6 +61,7 @@ jobs: path: bindings/python/dist wheels: + if: github.event_name != 'pull_request' runs-on: "${{ matrix.os }}" strategy: matrix: @@ -111,6 +121,7 @@ jobs: path: bindings/python/dist release: + if: github.event_name != 'pull_request' name: Release runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/release_rust.yml b/.github/workflows/release_rust.yml index 7e7f6a74be10..55670b8aa157 100644 --- a/.github/workflows/release_rust.yml +++ b/.github/workflows/release_rust.yml @@ -31,7 +31,16 @@ on: workflow_dispatch: jobs: + validate: + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Validate workflow definition + run: ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release_rust.yml")' + publish: + if: github.event_name != 'pull_request' runs-on: ubuntu-latest permissions: id-token: write From e7a2d74576e9bf6500796d0595cc558bb2e5963b Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Tue, 31 Mar 2026 18:50:05 +0800 Subject: [PATCH 3/3] ci: stop running python release workflow on PRs --- .github/workflows/release_python.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index faf3959f9108..9b58cc843d87 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -21,11 +21,6 @@ on: push: tags: - "v*" - pull_request: - branches: - - main - paths: - - ".github/workflows/release_python.yml" workflow_dispatch: concurrency: @@ -36,16 +31,7 @@ permissions: contents: read jobs: - validate: - if: github.event_name == 'pull_request' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - name: Validate workflow definition - run: ruby -e 'require "yaml"; YAML.load_file(".github/workflows/release_python.yml")' - sdist: - if: github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 @@ -61,7 +47,6 @@ jobs: path: bindings/python/dist wheels: - if: github.event_name != 'pull_request' runs-on: "${{ matrix.os }}" strategy: matrix: @@ -121,7 +106,6 @@ jobs: path: bindings/python/dist release: - if: github.event_name != 'pull_request' name: Release runs-on: ubuntu-latest permissions: