diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index e23983c9cc..183fe8b8ee 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -10,7 +10,8 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + # Needed for git tag updates below + fetch-tags: true - uses: actions/setup-node@v4 with: node-version: '*' diff --git a/.github/workflows/typescript-nudge.yml b/.github/workflows/typescript-nudge.yml index bb1c0b0b5b..13c49b60b4 100644 --- a/.github/workflows/typescript-nudge.yml +++ b/.github/workflows/typescript-nudge.yml @@ -13,8 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: 🔎 Get changed JavaScript files id: changed-javascript-files diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 15d4f3abf0..025c345985 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -21,7 +21,9 @@ jobs: if: ${{ startsWith(github.head_ref, 'release-') }} - uses: actions/checkout@v4 with: + # Needed for `nrwl/nx-set-shas` Action, ultimately for `nx affected` fetch-depth: 0 + fetch-tags: false if: ${{ !steps.release-check.outputs.IS_RELEASE }} - uses: nrwl/nx-set-shas@v3 if: ${{ !steps.release-check.outputs.IS_RELEASE }} @@ -75,7 +77,9 @@ jobs: if: ${{ startsWith(github.head_ref, 'release-') }} - uses: actions/checkout@v4 with: + # Needed for `nrwl/nx-set-shas` Action, ultimately for `nx affected` fetch-depth: 0 + fetch-tags: false if: ${{ !steps.release-check.outputs.IS_RELEASE }} - uses: nrwl/nx-set-shas@v3 if: ${{ !steps.release-check.outputs.IS_RELEASE }} @@ -183,8 +187,6 @@ jobs: if: ${{ startsWith(github.head_ref, 'release-') }} - name: Git checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 if: ${{ !steps.release-check.outputs.IS_RELEASE }} - name: setup pnpm/yarn run: corepack enable diff --git a/packages/build/tests/core/tests.js b/packages/build/tests/core/tests.js index c61de04624..c6e6eb0aa7 100644 --- a/packages/build/tests/core/tests.js +++ b/packages/build/tests/core/tests.js @@ -287,7 +287,10 @@ test('--branch', async (t) => { }) test('--baseRelDir', async (t) => { - const output = await new Fixture('./fixtures/basereldir').withFlags({ baseRelDir: false }).runWithConfig() + const output = await new Fixture('./fixtures/basereldir') + .withFlags({ baseRelDir: false }) + .withEnv({ COMMIT_REF: 'abcdefabcdefabcdefabcdef', CACHED_COMMIT_REF: undefined }) + .runWithConfig() t.snapshot(normalizeOutput(output)) })