GHA build workflow improvements (#232) #70
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
--- | |
name: Upload Release Wheel | |
on: | |
push: | |
branches: | |
- "release/*" | |
jobs: | |
build-wheel: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build wheel | |
run: | | |
./build.sh | |
echo "::set-output name=wheel_path::$(ls dist/*.whl)" | |
echo "::set-output name=wheel_name::$(basename $(ls dist/*.whl))" | |
id: build_wheel | |
- name: Get Tag | |
id: extract_tag | |
run: echo "##[set-output name=tag;]$(echo v${GITHUB_REF_NAME#*/})" | |
- name: Tag Repo | |
uses: richardsimko/update-tag@v1 | |
with: | |
tag_name: ${{ steps.extract_tag.outputs.tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Wheel Asset | |
id: upload-release-asset | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ steps.build_wheel.outputs.wheel_path }} | |
asset_name: ${{ steps.build_wheel.outputs.wheel_name }} | |
tag: ${{ steps.extract_tag.outputs.tag }} | |
overwrite: true |