33
33
permissions :
34
34
contents : write
35
35
id-token : write # This permission is required for trusted publishing
36
- env :
37
- PR_BRANCH_NAME : adjustments-release-${{ github.event.inputs.release-version }}
38
36
steps :
39
37
- name : Checkout the repository
40
38
uses : actions/checkout@v4
@@ -52,35 +50,16 @@ jobs:
52
50
run : poetry install --with docs
53
51
- name : Create new documentation
54
52
run : |
55
- sphinx-apidoc -o docs/sphinx src/codeflare_sdk "**/*test_*" --force
56
- make clean -C docs/sphinx
57
- make html -C docs/sphinx
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 }}
58
57
- name : Copy demo notebooks into SDK package
59
58
run : cp -r demo-notebooks src/codeflare_sdk/demo-notebooks
60
59
- name : Run poetry build
61
60
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
75
61
env :
76
62
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 }}
84
63
- name : Create Github release
85
64
uses : ncipollo/release-action@v1
86
65
with :
0 commit comments