-
Notifications
You must be signed in to change notification settings - Fork 255
Expand file tree
/
Copy pathaction.yaml
More file actions
55 lines (49 loc) · 1.71 KB
/
Copy pathaction.yaml
File metadata and controls
55 lines (49 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: 'Pack Streamlit Component Library'
description: 'Packing Streamlit Component Library'
inputs:
working_directory:
required: false
description: 'Directory where the streamlit/streamlit repository will be checked out'
default: 'streamlit'
outputs:
output_file:
description: 'Packed Streamlit Component Library file'
value: ${{ steps.final_step.outputs.output_file }}
runs:
using: 'composite'
steps:
- name: Check prerequisite
shell: bash
run: |
if ! command -v node > /dev/null
then
echo "Node is required to use this action"
exit 1
fi
- name: Checkout streamlit/streamlit
uses: actions/checkout@v4
with:
persist-credentials: false
repository: streamlit/streamlit
ref: develop
path: ${{ inputs.working_directory }}
- name: Install node dependencies for streamlit-component-lib
working-directory: ${{ inputs.working_directory }}/component-lib/
shell: bash
run: |
corepack enable
corepack install
yarn install
- name: Pack streamlit-component-lib package
working-directory: ${{ inputs.working_directory }}/component-lib/
shell: bash
run: yarn run build && npm pack
- name: Link develop version of streamlit-component-lib
if: inputs.custom_streamlit_component_lib_file != ''
working-directory: ${{ inputs.working_directory }}/component-lib/
id: final_step
shell: bash
run: |
component_lib_tar_gz=$(find "./" -maxdepth 1 -name 'streamlit-component-lib-*.tgz')
component_lib_tar_gz=$(readlink -e "${component_lib_tar_gz}")
echo "output_file=${component_lib_tar_gz}" >> $GITHUB_OUTPUT