diff --git a/.github/workflows/test-ref-branch.yml b/.github/workflows/test-ref-branch.yml index bb75cd4..f2ef863 100644 --- a/.github/workflows/test-ref-branch.yml +++ b/.github/workflows/test-ref-branch.yml @@ -2,8 +2,6 @@ name: Test reference branch on: push: - release: - types: [published] jobs: test-ref-branch: diff --git a/actions/build-test-publish/action.yml b/actions/build-test-publish/action.yml index cb2aa02..f66e67e 100644 --- a/actions/build-test-publish/action.yml +++ b/actions/build-test-publish/action.yml @@ -2,9 +2,17 @@ name: Build, test, publish description: Build, optionally test, and optionally publish to NPM inputs: - vars: - description: JSON representation of workflow vars object + node_version: + description: Node version required: true + terminal_pre_build: + description: If true, start a terminal session before building + required: false + default: 'false' + terminal_post_build: + description: If true, start a terminal session after building + required: false + default: 'false' runs: using: composite @@ -13,11 +21,11 @@ runs: - name: Setup node uses: actions/setup-node@v6 with: - node-version: ${{ fromJSON(inputs.vars).NODE_VERSION }} + node-version: ${{ inputs.node_version }} registry-url: https://registry.npmjs.org/ - name: Start terminal session (pre build) - if: fromJSON(inputs.vars).TERMINAL_PRE_BUILD == 'true' + if: inputs.terminal_pre_build == 'true' uses: mxschmitt/action-tmate@v3 - name: Build @@ -38,18 +46,18 @@ runs: echo "version=$version" >> $GITHUB_OUTPUT echo "label=$label" >> $GITHUB_OUTPUT - npm install + npm clean-install - # If version has a label, build in development mode. + # If version has a label, build in that mode. if [[ "$label" != "" ]] then - npm run build:dev + npm run build:$label else - npm run build:release + npm run build:prod fi - name: Start terminal session (post build) - if: fromJSON(inputs.vars).TERMINAL_POST_BUILD == 'true' + if: inputs.terminal_post_build == 'true' uses: mxschmitt/action-tmate@v3 - name: Test