Skip to content

Commit

Permalink
ci(build-and-upload): migrate to a reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Mar 7, 2024
1 parent e517f84 commit dec0320
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 27 deletions.
17 changes: 0 additions & 17 deletions .github/actions/build-and-upload/action.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/build-and-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Upload Artifacts

on:
workflow_call:
secrets:
npm_token:
required: true

jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Setup
uses: ./.github/actions/setup
with:
npm_token: ${{ secrets.npm_token }}
- name: Build
shell: bash
run: yarn lerna run build --since=origin/master --include-dependencies
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ci-builds-${{ github.run_id }}-${{ github.run_attempt }}
path: |
packages/core/dist/
packages/style/dist/
if-no-files-found: ignore
14 changes: 4 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@ on:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Setup
uses: ./.github/actions/setup
with:
npm_token: ${{ secrets.npm_token }}
- uses: ./.github/actions/build-and-upload
name: Build
uses: .github/workflows/build-and-upload.yml
secrets:
npm_token: ${{ secrets.npm_token }}
ci:
needs: build
runs-on: ubuntu-latest
Expand Down

0 comments on commit dec0320

Please sign in to comment.