Don't trample over existing python installs

This commit is contained in:
Andrew Cassidy 2024-08-20 00:28:38 -07:00
parent d2296fb926
commit 629d931979

View File

@ -1,5 +1,8 @@
name: 'Yaclog'
description: 'Get version information from a changelog, and optionally create a new release'
branding:
icon: file-text
color: blue
inputs:
markdown:
@ -42,10 +45,18 @@ runs:
uses: actions/setup-python@v5
with:
python-version: '3.10'
update-environment: 'false'
- name: Setup Yaclog
shell: bash
run: python -m pip install ${{ github.action_path }}
run: |
${{ steps.setup-python.outputs.python-path }} -m pip install ${{ github.action_path }}
# now make it available in $PATH
# this whole rigamarole is because we are using a python root that isnt in $PATH as to not step over other actions
mkdir -p "$GITHUB_ACTION_PATH/bin"
echo '${{ steps.setup-python.outputs.python-path }} -m yaclog.cli $@' > "$GITHUB_ACTION_PATH/bin/yaclog"
chmod +x "$GITHUB_ACTION_PATH/bin/yaclog"
echo "$GITHUB_ACTION_PATH/bin" > "$GITHUB_PATH"
- name: Create New Release
shell: bash