Skip to content

Commit

Permalink
cicd: remove usage of composite action for cd to prevent failure
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-p committed Nov 13, 2024
1 parent 06a92fd commit ab3a1b2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 47 deletions.
43 changes: 0 additions & 43 deletions .github/actions/python-semantic-release/action.yaml

This file was deleted.

39 changes: 35 additions & 4 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,42 @@ jobs:
exit $rc
fi
- name: Semantic Release
- name: pre-commit and pytest
if: steps.check_version.outputs.return_code == '0'
uses: ./.github/actions/python-semantic-release
with:
github_token: ${{ steps.app-token.outputs.token }}
run: |
set -o pipefail
poetry run pre-commit run --all-files && git diff --exit-code
poetry run pytest
- name: Set Git user as GitHub actions
if: steps.check_version.outputs.return_code == '0'
run: git config --global user.email "[email protected]" && git config --global user.name "github-actions"

- name: Update release
if: steps.check_version.outputs.return_code == '0'
run: poetry run semantic-release --strict version
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Create Wheel
if: steps.check_version.outputs.return_code == '0'
run: poetry build --format wheel

- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
if: steps.check_version.outputs.return_code == '0'
with:
path: dist

- name: Publish to GitHub
if: steps.check_version.outputs.return_code == '0'
run: poetry run semantic-release publish
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

- name: Publish to PyPI
if: steps.check_version.outputs.return_code == '0'
uses: pypa/gh-action-pypi-publish@release/v1


publish-docs:
name: Publish Docs
Expand Down

0 comments on commit ab3a1b2

Please sign in to comment.