chore: bump version number and update changelog #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Check if docs need an update" | |
| on: | |
| push: | |
| branches: | |
| - '[0-9]+.[0-9]+' | |
| permissions: | |
| contents: write | |
| # Only one instance of this workflow will run on the same ref (PR/Branch/Tag) | |
| # Previous runs will be cancelled. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-docs: | |
| name: Check if docs need an update | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.ref }} | |
| # Need a complete fetch to make the master merge check work | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| token: ${{ secrets.ALL_REPO_PAT }} | |
| - name: Setup git | |
| run: | | |
| # NOTE: The user email is {user.id}+{user.login}@users.noreply.github.com. | |
| # See users API: https://api.github.com/users/github-actions%5Bbot%5D | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git fetch origin master | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Populate variables | |
| id: versions | |
| run: | | |
| . ./hooks/populate-hook-constants.sh | |
| echo "constantsVersion=$constantsVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| echo "constantsVersionXy=$constantsVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| echo "setupVersion=$setupVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| echo "setupVersionXy=$setupVersionXy" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| echo "newestVersion=$newestVersion" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| echo "targetBranch=$targetBranch" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV" | |
| - name: Check tag and branch correctness | |
| run: | | |
| if [[ "${{ steps.versions.outputs.constantsVersion }}" != "${{ steps.versions.outputs.setupVersion }}" ]]; | |
| then | |
| echo "Constants version and setup version mismatch" | |
| exit 1 | |
| fi | |
| if [[ "refs/heads/${{ steps.versions.outputs.setupVersion }}" != ${{ github.ref }}* ]] | |
| then | |
| echo "Branch name and setup version mismatch" | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: make dev-install | |
| - name: Build docs | |
| run: make build-docs | |
| - name: Check for changes in docs and create a commit if necessary | |
| run: | | |
| git update-index --really-refresh | |
| if git diff-index --quiet HEAD; then | |
| # No-op, docs are updated | |
| else | |
| # Update docs and create a commit on the branch | |
| git add --all | |
| git commit -nm "doc: update docs for v${{ steps.versions.outputs.setupVersion }}" | |
| git push | |
| fi |