Prepare release v1.9.0 (#207) #20
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: Release Artifacts | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
name: Build release artifacts | |
environment: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: '1.8.3' | |
- name: Install release dependencies | |
run: pip install -U typer mistletoe | |
- name: Build packages | |
run: | | |
poetry build | |
shell: bash | |
- name: Extract changelog | |
run: | | |
python scripts/extract-changelog.py "${TAG_NAME}" | tee RELEASE_CHANGELOG.txt | |
shell: bash | |
env: | |
TAG_NAME: ${{ github.ref_name }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
./dist/qiskit* | |
RELEASE_CHANGELOG.txt | |
create_release: | |
name: Create GitHub release | |
needs: build | |
environment: release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ./dist/qiskit* | |
body_path: "RELEASE_CHANGELOG.txt" | |
deploy: | |
name: Deploy to PyPI | |
needs: build | |
environment: release | |
permissions: | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |