Skip to content

Commit

Permalink
Redesigned CD pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Shritesh99 committed Nov 28, 2023
1 parent 8c552dd commit 867a696
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
if: needs.Release_Check.result == 'success'
uses: ./.github/workflows/release_steps.yml
secrets:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

Docs:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Release
on:
workflow_call:
secrets:
BOT_TOKEN:
required: true
PYPI_TOKEN:
required: true

Expand All @@ -29,16 +31,19 @@ jobs:
set +e
echo ::set-output name=release::$(autopub check)
- name: Publish
uses: actions/checkout@v4
if: steps.check_release.outputs.release == ''
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
git remote set-url origin https://${{ github.actor }}:${{ secrets.BOT_TOKEN }}@github.com/${{ github.repository }}
autopub prepare
poetry build
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git rm --cached RELEASE.md
git commit -m "Release ${{ github.repository_basename }} ${{ github.event.release.name }}"
git push origin master
git push origin master --force
poetry publish --username=__token__

0 comments on commit 867a696

Please sign in to comment.