Skip to content

Commit

Permalink
ci release test
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jun 20, 2024
1 parent ef591b8 commit 28851d8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
49 changes: 40 additions & 9 deletions .github/workflows/release_maixcam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
echo "-- Test MaixPy basic for Linux now --"
echo "--------------------------------"
chmod +x ./run.sh && ./run.sh test/test_basic.py
release_name=`ls dist|awk '{print $1}'`
release_path=dist/$release_name
echo ::set-output name=release_linux_path::$release_path
echo ::set-output name=release_linux_name::$release_name
mkdir -p artifact
cp dist/* artifact/
release_name=`ls artifact|awk '{print $1}'`
release_path=artifact/$release_name
echo ::set-output name=release_linux_path::$release_path
echo ::set-output name=release_linux_name::$release_name
echo "----------------------------------"
echo "-- Build MaixPy for MaixCAM now --"
echo "----------------------------------"
Expand All @@ -65,12 +65,36 @@ jobs:
echo ::set-output name=release_path::$release_path
echo ::set-output name=release_name::$release_name
- name: Publish MaixPy to pypi.org
- name: Build doc
id: build_doc
run: |
echo "[pypi]" > ~/.pypirc
echo " username = __token__" >> ~/.pypirc
echo " password = ${{ secrets.PYPI_TOKEN }}" >> ~/.pypirc
twine upload artifact/*.whl
pip3 install teedoc
cd docs
echo "== install plugins =="
teedoc install
echo "== start build =="
teedoc build
echo "== build complete =="
remote_addr=`git remote get-url --push origin`
remote_addr=`echo $remote_addr| awk -F'://' '{print $2}'`
user_name=`git log -1 --pretty=format:'%an'`
user_email=`git log -1 --pretty=format:'%ae'`
echo "== checkout gh-pages branch =="
doc_dir=maixpy_${{ github.ref_name }}_doc
mv out $doc_dir
zip ${doc_dir}.zip -r $doc_dir
release_name=${doc_dir}.zip
release_path=$release_name
echo ::set-output name=release_path::$release_path
echo ::set-output name=release_name::$release_name
- name: Upload MaixPy Doc to release assets
uses: svenstaro/upload-release-action@v2
with:
file: ${{ steps.build_doc.outputs.release_path }}
asset_name: ${{ steps.build_doc.outputs.release_name }}
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload MaixPy MaixCAM to release assets
uses: svenstaro/upload-release-action@v2
Expand All @@ -88,3 +112,10 @@ jobs:
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish MaixPy to pypi.org
run: |
echo "[pypi]" > ~/.pypirc
echo " username = __token__" >> ~/.pypirc
echo " password = ${{ secrets.PYPI_TOKEN }}" >> ~/.pypirc
twine upload artifact/*.whl
2 changes: 1 addition & 1 deletion maix/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

version_major = 4
version_minor = 3
version_patch = 4
version_patch = 5

__version__ = "{}.{}.{}".format(version_major, version_minor, version_patch)

0 comments on commit 28851d8

Please sign in to comment.