-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
252 changed files
with
8,521 additions
and
5,846 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: 🌒 Nightly Release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 7 * * *" # every day at 12AM PST | ||
|
||
|
@@ -41,49 +42,43 @@ jobs: | |
- name: 📥 Install deps | ||
run: yarn --frozen-lockfile | ||
|
||
- name: ⤴️ Update Version if needed | ||
- name: 🕵️ Check for changes | ||
id: version | ||
run: | | ||
# get latest commit sha | ||
SHA=$(git rev-parse HEAD) | ||
# get first 7 characters of sha | ||
SHORT_SHA=${SHA::7} | ||
# get latest nightly tag | ||
LATEST_NIGHTLY_TAG=$(git tag -l v0.0.0-nightly-\* --sort=-committerdate | head -n 1) | ||
CHANGES=$(git diff $LATEST_NIGHTLY_TAG..dev -- ./packages/ -- ':!packages/**/package.json') | ||
# check if there are changes to ./packages | ||
if [[ -n $(echo $CHANGES | xargs) ]]; then | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Remix Run Bot" | ||
# check if last commit to dev starts would be the nightly tag we're about to create (minus the date) | ||
# if it is, we'll skip the nightly creation | ||
# if not, we'll create a new nightly tag | ||
if [[ ${LATEST_NIGHTLY_TAG} == v0.0.0-nightly-${SHORT_SHA}-* ]]; then | ||
echo "🛑 Latest nightly tag is the same as the latest commit sha, skipping nightly release" | ||
else | ||
# yyyyMMdd format (e.g. 20221207) | ||
DATE=$(date '+%Y%m%d') | ||
# v0.0.0-nightly-<short sha>-<date> | ||
NEXT_VERSION=0.0.0-nightly-${SHORT_SHA}-${DATE} | ||
# set output so it can be used in other jobs | ||
echo "NEXT_VERSION=${NEXT_VERSION}" >> $GITHUB_OUTPUT | ||
git checkout -b nightly/${NEXT_VERSION} | ||
if [ -z "$(git status --porcelain)" ]; then | ||
echo "✨" | ||
else | ||
echo "dirty working directory..." | ||
git add . | ||
git commit -m "dirty working directory..." | ||
fi | ||
yarn run version ${NEXT_VERSION} --skip-prompt | ||
else | ||
echo "🛑 no changes since last nightly, skipping..." | ||
fi | ||
- name: 🏗 Build | ||
- name: ⤴️ Update version | ||
if: steps.version.outputs.NEXT_VERSION | ||
run: yarn build | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Remix Run Bot" | ||
git checkout -b nightly/${{steps.version.outputs.NEXT_VERSION}} | ||
yarn run version ${{steps.version.outputs.NEXT_VERSION}} --skip-prompt | ||
git push origin --tags | ||
- name: 🏷 Push Tag | ||
- name: 🏗 Build | ||
if: steps.version.outputs.NEXT_VERSION | ||
run: git push origin --tags | ||
run: yarn build | ||
|
||
- name: 🔐 Setup npm auth | ||
if: steps.version.outputs.NEXT_VERSION | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,9 @@ jobs: | |
github.repository == 'remix-run/remix' && | ||
!contains(github.ref, 'nightly') | ||
runs-on: ubuntu-latest | ||
outputs: | ||
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | ||
published: ${{ steps.changesets.outputs.published }} | ||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
@@ -61,3 +64,67 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.NIGHTLY_PAT }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
findPackage: | ||
name: 🦋 Find Package | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'remix-run/remix' && needs.release.outputs.published == 'true' | ||
outputs: | ||
package: ${{ steps.findPackage.outputs.package }} | ||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: "npm" | ||
|
||
- id: findPackage | ||
run: | | ||
package=$(node ./scripts/release/find-release-from-changeset.js) | ||
echo "package=${package}" >> $GITHUB_OUTPUT | ||
env: | ||
packageVersionToFollow: "remix" | ||
publishedPackages: ${{ needs.release.outputs.publishedPackages }} | ||
|
||
comment: | ||
name: 📝 Comment on related issues and pull requests | ||
if: github.repository == 'remix-run/remix' && needs.findPackage.outputs.package != '' | ||
needs: [release, findPackage] | ||
uses: ./.github/workflows/release-comments.yml | ||
with: | ||
ref: refs/tags/${{ needs.findPackage.outputs.package }} | ||
packageVersionToFollow: "remix" | ||
|
||
deployments: | ||
name: 🚀 Deployment Tests | ||
if: github.repository == 'remix-run/remix' | ||
needs: [release, findPackage] | ||
uses: ./.github/workflows/deployments.yml | ||
secrets: | ||
TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }} | ||
TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }} | ||
TEST_CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }} | ||
TEST_CF_GLOBAL_API_KEY: ${{ secrets.TEST_CF_GLOBAL_API_KEY }} | ||
TEST_CF_EMAIL: ${{ secrets.TEST_CF_EMAIL }} | ||
TEST_CF_PAGES_API_TOKEN: ${{ secrets.TEST_CF_PAGES_API_TOKEN }} | ||
TEST_CF_API_TOKEN: ${{ secrets.TEST_CF_API_TOKEN }} | ||
TEST_DENO_DEPLOY_TOKEN: ${{ secrets.TEST_DENO_DEPLOY_TOKEN }} | ||
TEST_FLY_TOKEN: ${{ secrets.TEST_FLY_TOKEN }} | ||
TEST_NETLIFY_TOKEN: ${{ secrets.TEST_NETLIFY_TOKEN }} | ||
TEST_VERCEL_TOKEN: ${{ secrets.TEST_VERCEL_TOKEN }} | ||
TEST_VERCEL_USER_ID: ${{ secrets.TEST_VERCEL_USER_ID }} | ||
|
||
stacks: | ||
name: 🥞 Remix Stacks Test | ||
if: github.repository == 'remix-run/remix' | ||
needs: [release, findPackage] | ||
uses: ./.github/workflows/stacks.yml | ||
with: | ||
version: ${{ needs.findPackage.outputs.package }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
A note on `deno_resolve_npm_imports.json` | ||
|
||
The `"imports"` field in `deno_resolve_npm_imports.json` is used to resolve NPM imports for `packages/remix-deno`. This import map is used solely for the d`enoland.vscode-deno` extension. | ||
|
||
Remix does not support import maps. Dependency management is done through `npm` and `node_modules/` instead. Deno-only dependencies may be imported via URL imports (without using import maps). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
{ | ||
"// Resolve NPM imports for `packages/remix-deno`.": "", | ||
"// This import map is used solely for the denoland.vscode-deno extension.": "", | ||
"// Remix does not support import maps.": "", | ||
"// Dependency management is done through `npm` and `node_modules/` instead.": "", | ||
"// Deno-only dependencies may be imported via URL imports (without using import maps).": "", | ||
"imports": { | ||
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@1.6.4", | ||
"@remix-run/server-runtime": "https://esm.sh/@remix-run/server-runtime@nightly", | ||
"mime": "https://esm.sh/[email protected]" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.