Skip to content

Commit

Permalink
chore(repo): add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Sep 5, 2023
1 parent a7f5c6d commit b562916
Show file tree
Hide file tree
Showing 5 changed files with 405 additions and 22 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Release Projects

on:
workflow_dispatch:
push:
branches:
- main

jobs:
release:
if: |
!startsWith(github.event.head_commit.message, 'chore(release):') &&
!startsWith(github.event.head_commit.message, 'chore(repo):')
runs-on: ubuntu-latest

name: release

steps:
- name: Checkout Commit
uses: actions/checkout@v1

- name: Checkout Main
run: git branch -f main origin/main

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Enable Corepack
id: pnpm-setup
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm config set script-shell "/usr/bin/bash"
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: pnpm Cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-setup.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: ESLint Cache
uses: actions/cache@v3
with:
path: ./.eslintcache
key: ${{ runner.os }}-eslintcache-${{ hashFiles('./eslintcache') }}
restore-keys: |
${{ runner.os }}-eslintcache-
- name: Setup Moon
uses: moonrepo/setup-moon-action@v1
with:
version: 1.12.1

- name: Sanity Check
run: |
echo git `git version`;
echo branch `git branch --show-current`;
echo node `node -v`;
echo pnpm `pnpm -v`
echo `moon --version`
- name: pnpm install
run: pnpm install --frozen-lockfile

# Sanity check before we publish
- name: Build Projects
run: |
moon run jsx-email:build.packages
- name: Release
run: moon run :release --affected --concurrency 1
10 changes: 10 additions & 0 deletions .moon/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ tasks:
deps:
- ~:tsconfig.link

# FIXME: since @jsx-email/components uses workspace deps now, we'll need a script that recognizes
# it needs to be updated and manually commits to update the package using versioner
release:
command: versioner --target $projectRoot
deps:
- ~:build
options:
cache: false
outputStyle: 'stream'

tsconfig.link:
command: ln -sf ../../shared/tsconfig.default.json tsconfig.json
options:
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@
<div align="center">The next generation of writing emails.<br />High-quality, unstyled components for creating emails.</div>
<br />
<div align="center">
<a href="https://react.email">Website</a>
<a href="https://react.email">Website</a>
<span> · </span>
<a href="https://github.com/resendlabs/react-email">GitHub</a>
<a href="https://github.com/resendlabs/react-email">GitHub</a>
<span> · </span>
<a href="https://react.email/discord">Discord</a>
</div>

## Fork Information

This is a soft fork of `@react-email`. The information below is accurate, however when using this fork, substitute `@jsx-email` for `@react-email` in instructions.

Users can expect that this project is in line with the upstream project. The intent of this project to provide an up to date channel, merging PRs from the upstream project quickly and rolling out fixes and new features faster than the `react-email` project can currently tackle.

## Introduction

A collection of high-quality, unstyled components for creating beautiful emails using React and TypeScript.
Expand Down Expand Up @@ -87,7 +93,7 @@ All components were tested using the most popular email clients.

| <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |

## Development

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"devDependencies": {
"@babel/core": "7.21.8",
"@babel/preset-react": "7.22.5",
"@dot/versioner": "^0.1.5",
"@react-email/render": "0.0.6",
"@types/jest": "29.5.3",
"@types/react": "18.0.20",
Expand All @@ -23,7 +24,6 @@
"tsup": "7.1.0",
"typescript": "5.1.6"
},
"packageManager": "[email protected]",
"lint-staged": {
"*.{ts,js}": [
"eslint --fix --cache"
Expand All @@ -40,5 +40,6 @@
"((.github/**/*)|(README|CHANGELOG)|(**/(README|CHANGELOG))).md": [
"prettier --write"
]
}
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit b562916

Please sign in to comment.