From eb6f1cd62c36bd498aa1ced8b074c664268796b8 Mon Sep 17 00:00:00 2001 From: selankon Date: Fri, 9 Feb 2024 18:55:21 +0100 Subject: [PATCH] chore(gh-action): fix the action --- .github/workflows/publish_artifacts.yml | 31 ++++++++++++------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish_artifacts.yml b/.github/workflows/publish_artifacts.yml index eab750b5..6d4c5471 100644 --- a/.github/workflows/publish_artifacts.yml +++ b/.github/workflows/publish_artifacts.yml @@ -2,28 +2,27 @@ name: Publish artifacts on: pull_request: - types: - - labeled + types: [ labeled ] jobs: - build-artifacts: - if: contains(github.event.pull_request.labels.*.name, 'artifact') - runs-on: ubuntu-latest + build-artifacts: + if: ${{ github.event.label.name == 'artifact' }} + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 + steps: + - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: + - name: Install node + uses: actions/setup-node@v3 + with: node-version: 16 - - uses: preactjs/compressed-size-action@v2 - with: - build-script: "build:production" + - uses: preactjs/compressed-size-action@v2 + with: + build-script: "build:production" - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: name: build-artifacts path: build/