3333 permissions :
3434 contents : write
3535 id-token : write # This permission is required for trusted publishing
36+ env :
37+ PR_BRANCH_NAME : adjustments-release-${{ github.event.inputs.release-version }}
3638 steps :
3739 - name : Checkout the repository
3840 uses : actions/checkout@v4
@@ -50,16 +52,35 @@ jobs:
5052 run : poetry install --with docs
5153 - name : Create new documentation
5254 run : |
53- gh workflow run publish-documentation.yaml \
54- --repo ${{ github.event.inputs.codeflare-repository-organization }}/codeflare-sdk \
55- --ref ${{ github.ref }} \
56- --field codeflare_sdk_release_version=${{ github.event.inputs.release-version }}
55+ sphinx-apidoc -o docs/sphinx src/codeflare_sdk "**/*test_*" --force
56+ make clean -C docs/sphinx
57+ make html -C docs/sphinx
5758 - name : Copy demo notebooks into SDK package
5859 run : cp -r demo-notebooks src/codeflare_sdk/demo-notebooks
5960 - name : Run poetry build
6061 run : poetry build
62+ - name : Commit changes in docs
63+ uses : stefanzweifel/git-auto-commit-action@v4
64+ with :
65+ file_pattern : ' docs'
66+ commit_message : " Changes in docs for release: v${{ github.event.inputs.release-version }}"
67+ create_branch : true
68+ branch : ${{ env.PR_BRANCH_NAME }}
69+ - name : Create a PR with code changes
70+ run : |
71+ if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
72+ GIT_BRANCH=${GITHUB_REF#refs/heads/}
73+ gh pr create --base "$GIT_BRANCH" --fill --head "${{ env.PR_BRANCH_NAME }}" --label "lgtm" --label "approved"
74+ fi
6175 env :
6276 GITHUB_TOKEN : ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
77+ - name : Wait until PR with code changes is merged
78+ run : |
79+ if git branch -a | grep "${{ env.PR_BRANCH_NAME }}"; then
80+ timeout 3600 bash -c 'until [[ $(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state) == "MERGED" ]]; do sleep 5 && echo "$(gh pr view '${{ env.PR_BRANCH_NAME }}' --json state --jq .state)"; done'
81+ fi
82+ env :
83+ GITHUB_TOKEN : ${{ github.TOKEN }}
6384 - name : Create Github release
6485 uses : ncipollo/release-action@v1
6586 with :
0 commit comments