clear doc errors and check doc error during build #5
Workflow file for this run
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
on: | |
push: | |
tags: | |
- v*.* | |
# on: | |
# push: | |
jobs: | |
build: | |
name: Collect and Build | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
container: | |
image: sophgo/tpuc_dev:latest | |
options: --user 1001 | |
volumes: | |
- /github/workspace:/workspace/tpu-mlir/ | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Build package | |
run: | | |
. release_pip.sh | |
tar -czvf tpu-mlir-resource.tar regression/ | |
cp -rf install/docs/TPU-MLIR_* ./ | |
cp install/docs/TPU-MLIR快速入门指南.pdf ./TPU-MLIR_Quick_Start_ZH.pdf | |
cp install/docs/TPU-MLIR开发参考手册.pdf ./TPU-MLIR_Technical_Reference_Manual_ZH.pdf | |
- name: Upload to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-artifact | |
path: | | |
./dist/ | |
./tpu-mlir-resource.tar | |
./TPU-MLIR_Quick_Start.pdf | |
./TPU-MLIR_Quick_Start_ZH.pdf | |
./TPU-MLIR_Technical_Reference_Manual.pdf | |
./TPU-MLIR_Technical_Reference_Manual_ZH.pdf | |
pypi-publish: | |
needs: build | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/tpu_mlir | |
permissions: | |
contents: write | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: my-artifact | |
path: ./ | |
- name: Release asset | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./dist/*.whl | |
./tpu-mlir-resource.tar | |
./TPU-MLIR_Quick_Start.pdf | |
./TPU-MLIR_Quick_Start_ZH.pdf | |
./TPU-MLIR_Technical_Reference_Manual.pdf | |
./TPU-MLIR_Technical_Reference_Manual_ZH.pdf | |
- name: Delete .tar.gz file | |
run: rm ./dist/*.tar.gz | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |