Skip to content

Provide GitHub action #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Godot toolkit install
author: Pawel Lampe
description: Install the Godot toolkit
branding:
icon: activity
color: blue

inputs:
version:
description: Version of the gdtoolkit to install
default: "4.*"

runs:
using: composite
steps:
- id: create-requirements-if-not-exists
run: |
if [ ! -f requirements.txt ]; then
echo "gdtoolkit==${{inputs.version}}" > requirements.txt
fi
Comment on lines +17 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only needed, because otherwise the actions/setup-python@v4 with cache: "pip" would fail
It searches for a requirements.txt or pyproject.toml
If this does not exists, the install-python would fail 🤷

Because Godot projects are usually not a python project, we need to fake that file

shell: bash

- id: install-python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: "pip"

- id: upgrade-setuptools
run: pip install --upgrade setuptools
shell: bash

- id: install-gdtoolkit
run: pip install gdtoolkit==${{inputs.version}}
shell: bash