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

Git reset in build step #385

Merged
merged 10 commits into from
Jul 17, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/check_nexus_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
git submodule update --init --recursive --jobs=4
git submodule foreach --recursive 'git fetch --tags'
cd src/pynxtools/definitions
git describe --dirty --tags --long --match "*[0-9]*" > ../nexus-ref.txt
printf "%s" "$(git describe --dirty --tags --long --abbrev=8 --match '*[0-9]*')" > ../nexus-ref.txt
cd ../
- name: Diff
run: |
diff -w src/pynxtools/nexus-version.txt src/pynxtools/nexus-ref.txt
diff src/pynxtools/nexus-version.txt src/pynxtools/nexus-ref.txt
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
git reset --hard HEAD
uv pip install build
- name: Build package
run: python -m build
run: |
git reset --hard HEAD
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions src/pynxtools/_build_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def get_vcs_version(tag_match="*[0-9]*") -> Optional[str]:
"--dirty",
"--tags",
"--long",
"--abbrev=8",
"--match",
tag_match,
],
Expand Down
2 changes: 1 addition & 1 deletion src/pynxtools/nexus-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2022.07-1278-g1d7000f4
v2022.07-1278-g1d7000f4
Loading