Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create draft release on push tag #61

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create release

on:
push:
tags:
- v*

jobs:
build:
uses: qua-platform/quam/.github/workflows/reusable-buld.yaml@main
release:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
pattern: python-package-*
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release create ${{ github.ref_name }}
--generate-notes --verify-tag --latest
--draft
"dist/quam-${GITHUB_REF_NAME#v}-py3-none-any.whl"
"dist/quam-${GITHUB_REF_NAME#v}.tar.gz"
38 changes: 38 additions & 0 deletions .github/workflows/reusable-buld.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build python package
on:
workflow_call
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pip"


- name: Install python deps
run: python -m pip install -e .[build]

- name: Build python package
run: python -m build

- uses: actions/upload-artifact@v4
id: upload-sdist
name: Upload sdist
with:
name: python-package-sdist
path: dist/quam-*.tar.gz
retention-days: 3
if-no-files-found: error

- uses: actions/upload-artifact@v4
id: upload-wheel
name: Upload wheel
with:
name: python-package-wheel
path: dist/quam-*.whl
retention-days: 3
if-no-files-found: error
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "quam"
version = "0.3.3"
#dynamic = ["version"]
description = "Quantum Abstract Machine (QuAM) facilitates development of abstraction layers in experiments."
authors = [
{ name = "Serwan Asaad", email = "[email protected]" },
Expand Down Expand Up @@ -52,6 +53,7 @@ dev = [
"pytest-mock >= 3.6.1",
]
docs = ["mkdocstrings[python]>=0.18", "mkdocs-gen-files", "mkdocs-jupyter"]
build = ["setuptools >= 71", "setuptools-scm >= 8.1.0", "build >= 1.2.1"]

[tool.black]
target-version = ["py38"]
Expand All @@ -64,6 +66,11 @@ max-line-length = 88
[tool.setuptools]
packages = ["quam"]

# ASK: Verify that we should use scm
[tool.setuptools_scm]
version_scheme = "only-version"
local_scheme = "no-local-version"


# Previous quam settings

Expand Down