-
Notifications
You must be signed in to change notification settings - Fork 1
ci: Release to PyPI workflow #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6b9197a
ci: add PyPI release workflow
tisonkun 5ef21e7
chore: use symlinks for packaging metadata in scopeql
tisonkun ea51ede
ci: release to PyPI
tisonkun 6fca2ac
tdiy
tisonkun 8acea88
try fix
tisonkun 75b00f8
try fix again
tisonkun 398328b
fix more
tisonkun a55da91
more
tisonkun cdbfd89
fix
tisonkun 1284280
targets
tisonkun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| /target | ||
| /dist |
This file contains hidden or 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
| 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 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| /target | ||
| /dist |
File renamed without changes.
This file contains hidden or 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
| 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 |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.