diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml new file mode 100644 index 00000000..a848c553 --- /dev/null +++ b/.github/actions/publish/action.yml @@ -0,0 +1,38 @@ +--- +name: package and draft GitHub release +# https://github.com/product-os/flowzone/tree/master/.github/actions +inputs: + json: + description: 'JSON stringified object containing all the inputs from the calling workflow' + required: true + secrets: + description: 'JSON stringified object containing all the secrets from the calling workflow' + required: true + variables: + description: 'JSON stringified object containing all the variables from the calling workflow' + required: true + + # --- custom environment + NODE_VERSION: + type: string + default: '20.x' + +runs: + # https://docs.github.com/en/actions/creating-actions/creating-a-composite-action + using: 'composite' + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + working-directory: ./ui + with: + node-version: ${{ inputs.NODE_VERSION }} + cache: npm + + - name: Install dependencies + shell: bash + run: | + if [ -e package-lock.json ]; then + npm ci + else + npm i + fi \ No newline at end of file