-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * change to test mode * remove * fix * fix * fix * test pypi * test * add publish * test * revert to prod * update
- Loading branch information
1 parent
bd7117c
commit faf05fe
Showing
5 changed files
with
110 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
workflow_dispatch: | ||
inputs: | ||
publish: | ||
description: 'Manually publish' | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
publish: | ||
if: inputs.publish == true || ${{ github.event_name == 'push' }} | ||
runs-on: [self-hosted, linux-3090] | ||
environment: 'prod' | ||
env: | ||
PREBUILD_DIR: /data2/actions-runner/prebuild | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Get mmdeploy version | ||
run: | | ||
export MMDEPLOY_VERSION=$(python3 -c "import sys; sys.path.append('mmdeploy');from version import __version__;print(__version__)") | ||
echo $MMDEPLOY_VERSION | ||
echo "MMDEPLOY_VERSION=$MMDEPLOY_VERSION" >> $GITHUB_ENV | ||
echo "OUTPUT_DIR=$PREBUILD_DIR/$MMDEPLOY_VERSION" >> $GITHUB_ENV | ||
pip install twine | ||
- name: Upload mmdeploy | ||
continue-on-error: true | ||
run: | | ||
cd $OUTPUT_DIR/mmdeploy | ||
ls -sha *.whl | ||
# twine upload mmdeploy-${MMDEPLOY_VERSION}-py3-none-manylinux2014_x86_64.whl --repository testpypi -u testmmdeploy -p ${{ secrets.test_pypi_password }} | ||
twine upload *.whl -u __token__ -p ${{ secrets.pypi_password }} | ||
- name: Upload mmdeploy_runtime | ||
continue-on-error: true | ||
run: | | ||
cd $OUTPUT_DIR/mmdeploy_runtime | ||
ls -sha *.whl | ||
# twine upload mmdeploy_runtime-${MMDEPLOY_VERSION}-cp38-none-manylinux2014_x86_64.whl --repository testpypi -u testmmdeploy -p ${{ secrets.test_pypi_password }} | ||
twine upload *.whl -u __token__ -p ${{ secrets.pypi_password }} | ||
- name: Create dummy softlinks to assets | ||
run: | | ||
ln -sf $OUTPUT_DIR/sdk ./prebuild | ||
ls -sha ./prebuild | ||
- name: Upload mmdeploy sdk | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: v${MMDEPLOY_VERSION} | ||
files: | | ||
./prebuild/*.zip | ||
./prebuild/*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters