Add package setup test

This commit is contained in:
2022-02-01 18:58:32 +01:00
parent 01baf0fcdb
commit d31871b8f6
2 changed files with 21 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import glob
import os
def get_folder_name():
addon = glob.glob(os.getcwd() + "/*/__init__.py", recursive=True)
return os.path.basename(os.path.dirname(addon[0]))
if __name__ == "__main__":
name = get_folder_name()
print(f'Show this value : {name}')
+8
View File
@@ -37,6 +37,14 @@ jobs:
- name: Change version number in the bl info addon data - name: Change version number in the bl info addon data
run: python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }} run: python '.github/version.py' --tag=${{ inputs.num_version }} --name=${{ env.APP_NAME }}
# Get the local folder name
- name: Setup package name
run: |
echo "With python, get a folder name"
python '.github/package.py'
echo "set with output value"
echo "::set-output name=type::$(python .github/package.py)"
- name: Commit the previous update - name: Commit the previous update
uses: actions-js/push@v1.3 uses: actions-js/push@v1.3
if: ${{ inputs.draft_version == false }} if: ${{ inputs.draft_version == false }}