Skip to content

Commit

Permalink
ci: Include distributions assets in GitHub release
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Sep 13, 2024
1 parent cddb0a5 commit 857990f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ jobs:
if: always()
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coveralls.lcov
format: lcov
55 changes: 38 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,63 @@ on:

jobs:

build:
name: build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install pypa/build tool
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build distribution
run: |
python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

github:
name: github
name: publish to github
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout tag
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Download all the dists
uses: actions/download-artifact@v4
with:
ref: ${{ github.ref_name }}
name: python-package-distributions
path: dist/
- name: Publish release
uses: ghalactic/github-release-from-tag@v5
if: github.ref_type == 'tag'
with:
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: "true"
assets: |
- path: dist/*
pypi:
name: pypi
name: publish to pypi
runs-on: ubuntu-latest
needs: github
needs:
- build
- github
environment:
name: pypi
url: https://pypi.org/p/qiskit-addon-utils
permissions:
id-token: write
steps:
- name: Checkout tag
uses: actions/checkout@v4
- name: Download all the dists
uses: actions/download-artifact@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: python-package-distributions
path: dist/
- name: Publish release to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 857990f

Please sign in to comment.