diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0236e630cd0..c5cd3c9f849 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -48,7 +48,16 @@ jobs: echo ::set-output name=NEXT_VERSION::${NEXT_VERSION} git checkout -b nightly/${NEXT_VERSION} - npm version ${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 git push origin --tags diff --git a/scripts/version.js b/scripts/version.js index 9de93776b0e..da96e84f5c1 100644 --- a/scripts/version.js +++ b/scripts/version.js @@ -35,10 +35,12 @@ async function run(args) { } // Confirm the next version number - let answer = await prompt( - `Are you sure you want to bump version ${currentVersion} to ${nextVersion}? [Yn] ` - ); - if (answer === false) return 0; + if (prereleaseId !== "--skip-prompt") { + let answer = await prompt( + `Are you sure you want to bump version ${currentVersion} to ${nextVersion}? [Yn] ` + ); + if (answer === false) return 0; + } await incrementRemixVersion(nextVersion); }