2022-11-08 01:40:21 +00:00
|
|
|
---
|
|
|
|
name: test 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
|
2023-05-16 00:02:37 +00:00
|
|
|
variables:
|
|
|
|
description: "JSON stringified object containing all the variables from the calling workflow"
|
|
|
|
required: true
|
2022-11-08 01:40:21 +00:00
|
|
|
|
|
|
|
# --- custom environment
|
|
|
|
NODE_VERSION:
|
|
|
|
type: string
|
2024-01-17 11:43:14 +00:00
|
|
|
default: '20.x'
|
2022-11-08 01:40:21 +00:00
|
|
|
VERBOSE:
|
|
|
|
type: string
|
|
|
|
default: "true"
|
|
|
|
|
|
|
|
runs:
|
|
|
|
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
# https://github.com/actions/setup-node#caching-global-packages-data
|
|
|
|
- name: Setup Node.js
|
2024-11-05 08:52:19 +00:00
|
|
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
|
2022-11-08 01:40:21 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ inputs.NODE_VERSION }}
|
|
|
|
cache: npm
|
|
|
|
|
2023-11-06 12:53:05 +00:00
|
|
|
- name: Set up Python 3.11
|
|
|
|
if: runner.os == 'macOS'
|
2024-06-21 18:48:07 +00:00
|
|
|
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4
|
2023-11-06 12:53:05 +00:00
|
|
|
with:
|
|
|
|
python-version: "3.11"
|
|
|
|
|
2022-11-08 01:40:21 +00:00
|
|
|
- name: Test release
|
2022-11-10 20:13:03 +00:00
|
|
|
shell: bash
|
2022-11-08 01:40:21 +00:00
|
|
|
run: |
|
|
|
|
set -ea
|
|
|
|
|
|
|
|
[[ '${{ inputs.VERBOSE }}' =~ on|On|Yes|yes|true|True ]] && set -x
|
|
|
|
|
2022-12-29 06:24:24 +00:00
|
|
|
if [[ -e package-lock.json ]] || [[ -e npm-shrinkwrap.json ]]; then
|
2022-11-08 01:40:21 +00:00
|
|
|
npm ci
|
|
|
|
else
|
|
|
|
npm i
|
|
|
|
fi
|
|
|
|
|
|
|
|
npm run build
|
2023-12-04 13:37:56 +00:00
|
|
|
npm run test:core
|
2022-11-08 01:40:21 +00:00
|
|
|
|
|
|
|
- name: Compress custom source
|
|
|
|
shell: pwsh
|
2023-08-17 13:50:34 +00:00
|
|
|
run: tar --exclude-vcs -acf ${{ runner.temp }}/custom.tgz .
|
2022-11-08 01:40:21 +00:00
|
|
|
|
|
|
|
- name: Upload custom artifact
|
2024-09-12 14:47:50 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
2022-11-08 01:40:21 +00:00
|
|
|
with:
|
2023-05-16 00:02:37 +00:00
|
|
|
name: custom-${{ github.event.pull_request.head.sha || github.event.head_commit.id }}-${{ runner.os }}-${{ runner.arch }}
|
2022-11-08 01:40:21 +00:00
|
|
|
path: ${{ runner.temp }}/custom.tgz
|
|
|
|
retention-days: 1
|