From 23e7f2afb7fa714bb16b8e0c2fdaedd6ed566e3b Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 9 May 2023 20:36:47 +0800 Subject: [PATCH] CI: avoid redudant build when making new release Signed-off-by: Tianling Shen --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26dd3b5..97ed007 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,13 +8,10 @@ on: pull_request: paths-ignore: - '**.md' - release: - types: - - published jobs: build: - name: Test ${{ matrix.arch }} + name: Build ${{ matrix.arch }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -76,14 +73,14 @@ jobs: - name: Store packages uses: actions/upload-artifact@v3 - if: github.event_name != 'release' + if: "!startsWith(github.ref, 'refs/tags/v')" with: name: ${{ matrix.arch}}-${{ github.sha}}-packages path: "*.ipk" - name: Upload packages uses: svenstaro/upload-release-action@v2 - if: github.event_name == 'release' + if: "startsWith(github.ref, 'refs/tags/v')" with: repo_token: ${{ github.token }} file: "*.ipk"