Skip to content

workflows/release: allow creating github release (#103) #9

workflows/release: allow creating github release (#103)

workflows/release: allow creating github release (#103) #9

Workflow file for this run

name: Release Artifacts
on:
push:
tags:
- 'v*'
jobs:
wheel-build:
name: Build and Publish Release Artifacts
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.6.1'
- name: Install release dependencies
run: pip install -U typer mistletoe
- name: Build packages
run: |
poetry build
shell: bash
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
path: ./dist/qiskit*
- name: Extract changelog
run: python scripts/extract-changelog.py ${{ github.ref_name }} | tee ${{ github.workspace }}-CHANGELOG.txt
- name: Create Github release
uses: softprops/action-gh-release@v1
with:
files: ./dist/qiskit*
body_path: ${{ github.workspace }}-CHANGELOG.txt
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1