Skip to content

Commit

Permalink
ci: add reusable workflow for upload and download build artifacts in …
Browse files Browse the repository at this point in the history
…actions (#2000)
  • Loading branch information
YossiSaadi authored Mar 11, 2024
1 parent fd6500e commit 05fd380
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/actions/download-builds/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Download and Extract Build Artifacts
description: Download build artifacts for all the packages and extract them to the correct location

runs:
using: "composite"
steps:
- name: Download and Extract
uses: actions/download-artifact@v4
with:
name: ci-builds-${{ github.run_id }}-${{ github.run_attempt }}
path: packages/
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

0 comments on commit 05fd380

Please sign in to comment.