Skip to content

Commit

Permalink
ci: build in the pr and release workflows, not in the "test" reusable…
Browse files Browse the repository at this point in the history
… workflow
  • Loading branch information
YossiSaadi committed Mar 11, 2024
1 parent 0f85d95 commit afa2d01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ on:
types: [opened, synchronize]

jobs:
build:
name: Build
uses: ./.github/workflows/build-and-upload.yml
secrets:
npm_token: ${{ secrets.npm_token }}

pr_checks:
needs: build
uses: ./.github/workflows/test.yml
secrets:
npm_token: ${{ secrets.npm_token }}
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@ name: Release new version
on: workflow_dispatch

jobs:
build:
name: Build
uses: ./.github/workflows/build-and-upload.yml
secrets:
npm_token: ${{ secrets.npm_token }}

prerequisites:
needs: build
uses: ./.github/workflows/test.yml
secrets:
npm_token: ${{ secrets.npm_token }}

release:
needs: prerequisites
needs: [build, prerequisites]
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ on:
required: true

jobs:
build:
name: Build
uses: ./.github/workflows/build-and-upload.yml
secrets:
npm_token: ${{ secrets.npm_token }}

checks:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down

0 comments on commit afa2d01

Please sign in to comment.