CA-388318: usb_reset.py: fixed byte issue #31
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
name: Create release from tag | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install build dependencies | |
run: | | |
pip install build | |
sudo apt-get install ocaml dune libfindlib-ocaml-dev libdune-ocaml-dev libcmdliner-ocaml-dev | |
- name: Generate python package for XenAPI | |
run: | | |
./configure --xapi_version=${{ github.ref_name }} | |
make python | |
- name: Store python distribution artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: XenAPI | |
path: scripts/examples/python/dist/ | |
release: | |
runs-on: ubuntu-latest | |
needs: build-python | |
steps: | |
- name: Retrieve python distribution artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: XenAPI | |
path: dist/ | |
- name: Create release ${{ github.ref_name }} | |
run: gh release create ${{ github.ref_name }} --repo ${{ github.repository }} --generate-notes dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-pypi: | |
runs-on: ubuntu-latest | |
needs: release | |
environment: pypi | |
permissions: | |
id-token: write | |
steps: | |
- name: Retrieve python distribution artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: XenAPI | |
path: dist/ | |
- name: Publish the Python release to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |