Skip to content

Commit

Permalink
feat: add npm build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaircloth-splunk committed Jul 16, 2021
1 parent d2f5670 commit de85323
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ outputs:
runs:
using: "composite"
steps:
# - run: |
# if [ -f "Pipfile.lock" ];
# then
# pip3 install pipx
# pipx install pipenv
# mkdir -p package/lib || true
# pipenv lock -r > package/lib/requirements.txt
# fi
# shell: bash
# - run: |
# if [ -f "poetry.lock" ]
# then
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
# mkdir -p package/lib || true
# poetry export -f requirements.txt -o package/lib/requirements.txt
# fi
# shell: bash
- shell: bash
run: |
if [ ! -f "Pipfile.lock" ] ; then exit 0
mkdir -p package/lib || true
pip install pipenv
pipenv lock -r > package/lib/requirements.txt
pipenv lock -d -r > requirements_dev.txt
- shell: bash
run: |
if [ ! -f "poetry.lock" ] ; then exit 0
mkdir -p package/lib || true
pip install poetry
poetry export --without-hashes -o package/lib/requirements.txt
poetry export --without-hashes --dev -o requirements_dev.txt
if [ ! -z $INPUT_VERSION ]; then poetry version $INPUT_VERSION; fi
- shell: bash
run: pip install -r requirements_dev.txt
- run: |
if [ ! -z $INPUT_VERSION ]; then ARG_VERSION="--ta-version=${INPUT_VERSION}"; fi
echo "::set-output name=result::$(echo $ARG_VERSION)"
Expand All @@ -52,6 +52,10 @@ runs:
shell: bash
env:
INPUT_VERSION: ${{ inputs.version }}
- run: |
if [ ! -z $INPUT_VERSION ]; then yarn version --new-version $INPUT_VERSION --no-git-tag-version; fi
[ -f package.json ] ;yarn run build
shell: bash
- run: chmod -R +r output
shell: bash
- id: output
Expand Down

0 comments on commit de85323

Please sign in to comment.