Skip to content

Commit

Permalink
feat(workflows): Upload Generated Docs
Browse files Browse the repository at this point in the history
Upload Generated Docs
  • Loading branch information
osama-salman99 committed Oct 4, 2023
1 parent f957597 commit 24288c9
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/generator-publish-sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,26 @@ jobs:
- name: Publish Code
working-directory: expediagroup/sdk/generator/package
run: |
git config --global user.email "[email protected]"
git config --global user.name "Expedia Group Open Source"
rm -rf ../../../../release/"${{github.event.inputs.name}}"
mkdir -p ../../../../release/"${{github.event.inputs.name}}"
tar -xzf *.tar.gz
rm *.tar.gz
echo "separator"
pwd
ls
echo "separator"
cp -r ./docs ../../../../release/"${{github.event.inputs.name}}"/
find ./ -name \*.py -exec cp {} ../../../../release/"${{github.event.inputs.name}}"/ \;
find ./ -name \*.yaml -exec cp {} ../../../../release/"${{github.event.inputs.name}}"/ \;
git fetch --depth=1 origin main
git checkout -b "${{github.event.inputs.name}}-${{github.event.inputs.version}}"
git add ../../../../release/\*
cd ../../../..
pip install -r ../../../../requirements-dev.txt
black .
cd -
git commit -m "chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK"
git push --set-upstream origin "${{github.event.inputs.name}}-${{github.event.inputs.version}}"
gh pr create -B main -H "${{github.event.inputs.name}}-${{github.event.inputs.version}}" --title 'chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK' --fill
env:
GH_TOKEN: ${{ github.token }}
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
branch: "${{github.event.inputs.name}}-${{github.event.inputs.version}}"
commit-message: "chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK"
title: "chore: Publish ${{github.event.inputs.name}} [${{github.event.inputs.version}}] SDK"
add-paths: |
release/*

0 comments on commit 24288c9

Please sign in to comment.