Skip to content

Commit af66808

Browse files
authored
Merge pull request #16 from algorandfoundation/cicd/fix_composite_action
cicd: remove usage of composite action for cd to prevent failure
2 parents 06a92fd + 2f6a444 commit af66808

File tree

2 files changed

+33
-46
lines changed

2 files changed

+33
-46
lines changed

.github/actions/python-semantic-release/action.yaml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/cd.yaml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,41 @@ jobs:
4747
exit $rc
4848
fi
4949
50-
- name: Semantic Release
50+
- name: pre-commit and pytest
51+
if: steps.check_version.outputs.return_code == '0'
52+
run: |
53+
set -o pipefail
54+
poetry run pre-commit run --all-files && git diff --exit-code
55+
poetry run pytest
56+
57+
- name: Set Git user as GitHub actions
58+
if: steps.check_version.outputs.return_code == '0'
59+
run: git config --global user.email "[email protected]" && git config --global user.name "github-actions"
60+
61+
- name: Update release
62+
if: steps.check_version.outputs.return_code == '0'
63+
run: poetry run semantic-release --strict version
64+
env:
65+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
66+
67+
- name: Create Wheel
68+
if: steps.check_version.outputs.return_code == '0'
69+
run: poetry build --format wheel
70+
71+
- uses: actions/upload-artifact@v4 # upload artifacts so they are retained on the job
5172
if: steps.check_version.outputs.return_code == '0'
52-
uses: ./.github/actions/python-semantic-release
5373
with:
54-
github_token: ${{ steps.app-token.outputs.token }}
74+
path: dist
75+
76+
- name: Publish to GitHub
77+
if: steps.check_version.outputs.return_code == '0'
78+
run: poetry run semantic-release publish
79+
env:
80+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
81+
82+
- name: Publish to PyPI
83+
if: steps.check_version.outputs.return_code == '0'
84+
uses: pypa/gh-action-pypi-publish@release/v1
5585

5686
publish-docs:
5787
name: Publish Docs

0 commit comments

Comments
 (0)