Prepare 0.2 release (#35) #2
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: Publish release | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
github: | |
name: github | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout tag | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Publish release | |
uses: ghalactic/github-release-from-tag@v5 | |
if: github.ref_type == 'tag' | |
with: | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
generateReleaseNotes: "true" | |
pypi: | |
name: pypi | |
runs-on: ubuntu-latest | |
needs: github | |
environment: | |
name: pypi | |
url: https://pypi.org/p/qiskit-addon-mpf | |
permissions: | |
id-token: write | |
steps: | |
- name: Checkout tag | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Install `build` tool | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
- name: Build distribution | |
run: | | |
python -m build | |
- name: Publish release to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |