Skip to content

Commit

Permalink
Detect changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 29, 2024
1 parent 6d6c701 commit bf03d0c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,29 @@ jobs:
- name: 🧪 Run unit tests
run: bun run test

check-changes:
runs-on: ubuntu-latest
outputs:
react-email: ${{ steps.filter.outputs.react-email }}
cli: ${{ steps.filter.outputs.cli }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Filter changes
id: filter
uses: dorny/paths-filter@v2
with:
filters: |
react-email:
- 'packages/react-email/**'
cli:
- 'packages/cli/**'
publish-cli:
name: Publish CLI
if: contains(github.event.head_commit.modified, 'packages/cli/')
if: needs.check-changes.outputs.cli == 'true'
needs: [test]
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -65,7 +85,7 @@ jobs:

publish-react-email:
name: Publish React Email
if: ${{ always() && contains(join(github.event.head_commit.modified, ','), 'packages/react-email') }}
if: needs.check-changes.outputs.react-email == 'true'
needs: [test]
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 1 addition & 1 deletion packages/react-email/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function WelcomeEmail({ locale, name }) {

### Translation files (en.json)

Add your translation files in the `locales` folder.
Add your translation files in the `locales` folder.

```json
{
Expand Down

0 comments on commit bf03d0c

Please sign in to comment.