Skip to content

Commit 03a8868

Browse files
committed
WIP
1 parent 9adcece commit 03a8868

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Upload Python Package
102

113
on:
@@ -18,20 +10,28 @@ permissions:
1810
jobs:
1911
release-build:
2012
runs-on: ubuntu-latest
21-
2213
steps:
2314
- uses: actions/checkout@v4
24-
15+
with:
16+
fetch-depth: 0 # This fetches all history and tags
17+
- run: git fetch --tags # This ensures all tags are fetched
18+
2519
- uses: actions/setup-python@v5
2620
with:
2721
python-version: "3.x"
28-
29-
- name: Build release distributions
22+
23+
- name: Install dependencies
3024
run: |
31-
# NOTE: put your own distribution build steps here.
32-
python -m pip install build
33-
python -m build
34-
25+
python -m pip install --upgrade pip
26+
pip install build setuptools setuptools_scm
27+
28+
- name: Check SCM Version
29+
run: |
30+
python -c "from setuptools_scm import get_version; print(f'Detected version: {get_version()}')"
31+
32+
- name: Build release distributions
33+
run: python -m build
34+
3535
- name: Upload distributions
3636
uses: actions/upload-artifact@v4
3737
with:
@@ -40,26 +40,19 @@ jobs:
4040

4141
pypi-publish:
4242
runs-on: ubuntu-latest
43-
4443
needs:
4544
- release-build
46-
4745
permissions:
48-
# IMPORTANT: this permission is mandatory for trusted publishing
4946
id-token: write
50-
51-
# Dedicated environments with protections for publishing are strongly recommended.
5247
environment:
5348
name: pypi
54-
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
55-
# url: https://pypi.org/p/YOURPROJECT
56-
49+
url: https://pypi.org/p/torch_ransac3d
5750
steps:
5851
- name: Retrieve release distributions
5952
uses: actions/download-artifact@v4
6053
with:
6154
name: release-dists
6255
path: dist/
63-
56+
6457
- name: Publish release distributions to PyPI
6558
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Requirements: torch
2727

2828
Install with <a href="https://pypi.org/project/torch-ransac3d"> Pypi </a>:
2929

30-
```pip install torch_ransac3d```
30+
```pip install torch-ransac3d```
3131

3232
# Example Usage
3333

0 commit comments

Comments
 (0)