Skip to content

Commit 7a3b7e4

Browse files
committed
edit '.github/workflows/node.yml' - run tests *before* build, use correct NODE_ENV's, added 'env.PROJECT_NAME'
Signed-off-by: StoneyDSP <nathanjhood@googlemail.com>
1 parent 3965414 commit 7a3b7e4

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/node.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
env:
17+
PROJECT_NAME: 'esbuild-scripts'
1718
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1819
NODE_ENV: 'production'
1920
BUILD_DIR: 'dist'
@@ -46,27 +47,29 @@ jobs:
4647
working-directory: ${{ github.workspace }}
4748
run: yarn
4849

49-
- name: Build
50-
shell: bash
51-
working-directory: ${{ github.workspace }}
52-
run: yarn build
53-
5450
- name: Test
5551
shell: bash
5652
env:
5753
NODE_ENV: test
5854
working-directory: ${{ github.workspace }}
5955
run: yarn test
6056

57+
- name: Build
58+
shell: bash
59+
env:
60+
NODE_ENV: production
61+
working-directory: ${{ github.workspace }}
62+
run: yarn build
63+
6164
- name: Upload Artifact
6265
uses: actions/upload-artifact@v4
6366
with:
64-
name: esbuild-scripts-${{ matrix.os }}-node-v${{ matrix.node-version }}
67+
name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}-node-v${{ matrix.node-version }}
6568
path: '${{ github.workspace }}/${{ env.BUILD_DIR }}'
6669

6770
- name: Download Artifact
6871
uses: actions/download-artifact@v4
6972
with:
70-
name: esbuild-scripts-${{ matrix.os }}-node-v${{ matrix.node-version }}
73+
name: ${{ env.PROJECT_NAME }}-${{ matrix.os }}-node-v${{ matrix.node-version }}
7174
path: '${{ github.workspace }}/${{ env.BUILD_DIR }}'
7275
github-token: ${{ env.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)