name: Release 🚀

on:
  push:
    tags:
      - '*'

env:
  ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

jobs:
  packaging:
    runs-on: ubuntu-latest
    if: github.repository == '3liz/lizmap-web-client'

    steps:
    - uses: actions/checkout@v2
      with:
        ref: versions

    - name: Set up Python 3.8
      uses: actions/setup-python@v2.2.1
      with:
        python-version: 3.8

    - name: Add the version
      run: ./add_version.py ${GITHUB_REF/refs\/tags\//}

    - name: Git identity
      run: |
        git config --global user.email "${{ secrets.BOT_MAIL }}"
        git config --global user.name "${{ secrets.BOT_NAME }}"

    - name: Check for changes
      run: |
        if git diff --exit-code; then
          echo "::set-env name=changes_exist::false"
        else
          echo "::set-env name=changes_exist::true"
        fi

    - name: Commit and push
      if: env.changes_exist == 'true'
      run: |
        git add -u
        git commit -m "Publish ${GITHUB_REF/refs\/tags\//}"
        git push --force https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git HEAD:versions

name: Release 🚀

on:
  push:
    tags:
      - '*'

env:
  ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'

jobs:
  packaging:
    runs-on: ubuntu-latest
    if: github.repository == '3liz/lizmap-web-client'

    steps:
    - uses: actions/checkout@v2
      with:
        ref: versions

    - name: Set up Python 3.8
      uses: actions/setup-python@v2.2.2
      with:
        python-version: 3.8

    - name: Add the version
      run: ./add_version.py ${GITHUB_REF/refs\/tags\//}

    - name: Git identity
      run: |
        git config --global user.email "${{ secrets.BOT_MAIL }}"
        git config --global user.name "${{ secrets.BOT_NAME }}"

    - name: Check for changes
      run: |
        if git diff --exit-code; then
          echo "::set-env name=changes_exist::false"
        else
          echo "::set-env name=changes_exist::true"
        fi

    - name: Commit and push
      if: env.changes_exist == 'true'
      run: |
        git add -u
        git commit -m "Publish ${GITHUB_REF/refs\/tags\//}"
        git push --force https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git HEAD:versions

Bump actions/setup-python from v2.2.1 to v2.2.2
Bump actions/setup-python from v2.2.1 to v2.2.2

Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.2.1 to v2.2.2.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2.2.1...dc73133d4da04e56a135ae2246682783cc7c7cb6)

Signed-off-by: dependabot[bot] <5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb@github.com>