Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/dist
93 changes: 93 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright 2025 ScopeDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Release PyPI

on:
push:
tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
# Manually trigger the workflow for pull requests: 1 (EDIT TO TRIGGER)
paths: [ '.github/workflows/release-pypi.yml' ]
workflow_dispatch:

permissions:
contents: read

jobs:
sdist:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: PyO3/maturin-action@v1
with:
command: sdist
args: -o dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist

wheels:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- { os: windows-2022 }
- { os: macos-15-intel, target: "x86_64-apple-darwin" }
- { os: macos-15, target: "aarch64-apple-darwin" }
- { os: ubuntu-24.04, target: "x86_64" }
- { os: ubuntu-24.04, target: "x86_64-unknown-linux-musl" }
- { os: ubuntu-24.04-arm, target: "aarch64" }
- { os: ubuntu-24.04-arm, target: "aarch64-unknown-linux-musl" }
- { os: ubuntu-24.04-arm, target: "armv7-unknown-linux-musleabihf" }
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- uses: PyO3/maturin-action@v1
with:
target: "${{ matrix.target }}"
command: build
args: --profile dist -o dist
sccache: true
manylinux: auto

- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-${{ matrix.os }}-${{ matrix.target }}
path: dist

release:
name: Release
runs-on: ubuntu-24.04
environment:
name: release
permissions:
contents: read
id-token: write
needs: [sdist, wheels]
steps:
- uses: actions/download-artifact@v7
with:
pattern: wheels-*
merge-multiple: true
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ github.repository == 'scopedb/scopeql' && github.event_name != 'pull_request' }}
with:
skip-existing: true
packages-dir: dist
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/dist
File renamed without changes.
44 changes: 44 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2025 ScopeDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[build-system]
requires = ["maturin>=1.5,<2.0"]
build-backend = "maturin"

[project]
name = "scopeql"
version = "0.3.1"
requires-python = ">=3.10"
description = "A command-line interface for ScopeDB"
authors = [{ name = "ScopeDB Inc.", email = "tison@scopedb.io" }]
classifiers = [
"Environment :: Console",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Rust",
]
license = { file = "LICENSE" }
readme = "README.md"

[project.urls]
Homepage = "https://github.com/scopedb/scopeql"
Repository = "https://github.com/scopedb/scopeql"
Changelog = "https://github.com/scopedb/scopeql/blob/main/CHANGELOG.md"

[tool.maturin]
bindings = "bin"
manifest-path = "scopeql/Cargo.toml"
module-name = "scopeql"
strip = true
1 change: 1 addition & 0 deletions taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

exclude = ["pyproject.toml"]
include = ["Cargo.toml", "**/*.toml"]

[formatting]
Expand Down