Skip to content

Commit

Permalink
fix env pub.yml (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
strint authored Jul 29, 2024
1 parent 939e21a commit 59b825e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on:
push:
branches:
- "pub/*"
schedule:
- cron: "0 1 * * *"
- main

concurrency:
group: onediff-pub-${{ github.ref }}
cancel-in-progress: true

env:
VERSION_LOCAL_SCHEME: no-local-version

jobs:
publish:
if: github.repository == 'siliconflow/onediff'
Expand All @@ -22,10 +24,7 @@ jobs:
fetch-depth: 0
- run: cat src/onediff/__init__.py
- run: python3 -m pip install build
- name: Set environment variable
env:
VERSION_LOCAL_SCHEME: no-local-version
run: echo "VERSION_LOCAL_SCHEME=$VERSION_LOCAL_SCHEME"
- run: echo "VERSION_LOCAL_SCHEME=$VERSION_LOCAL_SCHEME"
- run: python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
Expand Down
3 changes: 2 additions & 1 deletion onediff_diffusers_extensions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@


local_scheme = os.getenv("VERSION_LOCAL_SCHEME", "node-and-date")

setup(
name="onediffx",
description="onediff extensions for diffusers",
Expand Down Expand Up @@ -38,7 +39,7 @@
long_description_content_type="text/markdown",
use_scm_version={
"root": "../",
"write_to": "./onediff_diffusers_extensions/onediffx/_version.py",
"version_file": "./onediffx/_version.py",
"fallback_version": "0.0.0",
"version_scheme": "guess-next-dev",
"local_scheme": local_scheme,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
],
},
use_scm_version={
"write_to": "src/onediff/_version.py",
"version_file": "src/onediff/_version.py",
"fallback_version": "0.0.0",
"version_scheme": "guess-next-dev",
"local_scheme": local_scheme,
Expand Down

0 comments on commit 59b825e

Please sign in to comment.