Template
Update .gitea/workflows/update_version.yml
This commit is contained in:
@@ -22,22 +22,6 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
token: ${{ secrets.PAT_TOKEN }}
|
||||||
|
|
||||||
- name: Determine integration name
|
|
||||||
id: integration_name
|
|
||||||
run: |
|
|
||||||
INTEGRATION_NAME=$(find custom_components -mindepth 1 -maxdepth 1 -type d -exec test -f {}/manifest.json \; -print -quit | xargs basename)
|
|
||||||
if [ -z "$INTEGRATION_NAME" ]; then
|
|
||||||
echo "Error: Integration directory not found in custom_components/"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "integration_name=$INTEGRATION_NAME" >> $GITHUB_OUTPUT
|
|
||||||
echo "Detected integration name: $INTEGRATION_NAME"
|
|
||||||
|
|
||||||
- name: Update pyproject.toml with integration name
|
|
||||||
run: |
|
|
||||||
sed -i "s|custom_components/INTEGRATION_NAME/manifest.json|custom_components/${{ steps.integration_name.outputs.integration_name }}/manifest.json|g" pyproject.toml
|
|
||||||
cat pyproject.toml | grep version_variables
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user