diff --git a/.github/workflows/changelog-and-release.yml b/.github/workflows/changelog-and-release.yml index caf7b1ff..7815d4b2 100644 --- a/.github/workflows/changelog-and-release.yml +++ b/.github/workflows/changelog-and-release.yml @@ -78,7 +78,7 @@ jobs: run: | git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - git commit -m "v${{ steps.required-variables.outputs.version }}" -a + git commit -m "changelog and version v${{ steps.required-variables.outputs.version }}" -a working-directory: ${{ github.event.repository.name }} - name: Push changes diff --git a/.github/workflows/increment-version.yml b/.github/workflows/increment-version.yml index 762c64f6..51d8dcac 100644 --- a/.github/workflows/increment-version.yml +++ b/.github/workflows/increment-version.yml @@ -40,12 +40,23 @@ jobs: python3 ../scripts/binary/increment_version.py $HOME/files.json -c -n working-directory: ${{ github.event.repository.name }} + - name: Install dependencies + run: | + sudo apt-get install libxml2-utils xmlstarlet + + - name: Get required variables + id: required-variables + run: | + version=$(xmlstarlet fo -R "$(find . -name addon.xml.in)" | xmlstarlet sel -t -v 'string(/addon/@version)') + echo ::set-output name=version::$version + working-directory: ${{ github.event.repository.name }} + - name: Create PR for incrementing add-on versions uses: peter-evans/create-pull-request@v3.10.0 with: - commit-message: Add-on version incremented - title: Add-on version incremented + commit-message: Add-on version incremented to ${{ steps.required-variables.outputs.version }} from Weblate + title: Add-on version incremented to ${{ steps.required-variables.outputs.version }} from Weblate body: Add-on version incremented triggered by ${{ github.sha }} branch: inc-ver delete-branch: true - path: ./${{ github.event.repository.name }} \ No newline at end of file + path: ./${{ github.event.repository.name }}