Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #182 from nipreps/mnt/fix-packaging
Browse files Browse the repository at this point in the history
MNT: Drop local version to play nicely with test.pypi.org
  • Loading branch information
effigies authored Apr 27, 2024
2 parents e707ea3 + 4d62650 commit 34be165
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/pypi-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ on:
push:
branches: [main]
tags: ["*"]
pull_request:
branches: [ main ]
release:
types:
- published
workflow_dispatch:

permissions:
contents: read
id-token: write

jobs:
build-package:
Expand All @@ -29,9 +26,9 @@ jobs:
auto-release-test-pypi:
runs-on: ubuntu-latest
needs: [build-package]
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'nipreps/eddymotion' }}

if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
id-token: write
steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
Expand All @@ -41,16 +38,19 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

auto-release-pypi:
runs-on: ubuntu-latest
environment: "Release"
needs: [build-package]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ packages = ["src/eddymotion"]
[tool.hatch.version]
validate-bump = true
source = "vcs"
raw-options = { version_scheme = "nipreps-calver" }

[tool.hatch.version.raw-options]
version_scheme = "nipreps-calver"
local_scheme = "no-local-version"


[tool.hatch.build.hooks.vcs]
version-file = "src/eddymotion/_version.py"
Expand Down

0 comments on commit 34be165

Please sign in to comment.