reduce package size less than 100MB #3
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 | |
- name: Upload to Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-artifact | |
path: ./dist/ | |
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: | |
- name: Make dist dir | |
run: | | |
mkdir dist && cd dist | |
ls | |
- uses: actions/download-artifact@v3 | |
with: | |
name: my-artifact | |
path: ./dist/ | |
- name: Cd dist dir | |
run: | | |
pwd | |
ls | |
cd dist | |
ls | |
- name: Release asset | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./dist/*.whl | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |