Skip to content

Commit

Permalink
BUG - patch release workflow (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard authored Sep 19, 2024
1 parent a3e626a commit bde7fe4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ jobs:
release-test-pypi:
name: "Publish in-dev to test.pypi.org"
environment: release-test-pypi
if: github.repository_owner == 'conda-incubator' && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-package
if: github.repository_owner == 'conda-incubator' && github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
strategy:
Expand All @@ -69,7 +69,7 @@ jobs:
name: Packages-${{ matrix.directory }}
path: dist

- run: tar xf dist/*.tar.gz --strip-components=1
- run: ls -lR dist/

- name: "Upload package to Test PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down Expand Up @@ -103,8 +103,6 @@ jobs:
name: Packages-${{ matrix.directory }}
path: dist

- run: tar xf dist/*.tar.gz --strip-components=1

- name: "Upload to PyPI 🚀"
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
15 changes: 9 additions & 6 deletions conda-store-server/hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from hatchling.builders.hooks.plugin.interface import BuildHookInterface


CONDA_STORE_UI_VERSION = "2024.9.1"
CONDA_STORE_UI_VERSION = "2024.3.1"
CONDA_STORE_UI_URL = f"https://registry.npmjs.org/@conda-store/conda-store-ui/-/conda-store-ui-{CONDA_STORE_UI_VERSION}.tgz"

UI_FILES_EXTENSIONS = ["*.js", "*.css", "*.js.map", "*.css.map", "*.html"]
Expand Down Expand Up @@ -67,7 +67,10 @@ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
if Path(os.getenv("LOCAL_UI")).exists():
local_ui_path = os.getenv("LOCAL_UI")
source_directory = Path(local_ui_path) / "dist"
self.copy_ui_files(source_directory)
if source_directory.exists():
self.copy_ui_files(source_directory)
else:
print(f"Directory does not exist: {source_directory}")

else:
raise FileNotFoundError(
Expand Down Expand Up @@ -121,10 +124,10 @@ def copy_ui_files(self, source_directory: str) -> None:
for extension in UI_FILES_EXTENSIONS:
for file_path in source_directory.glob(extension):
target_path = server_build_static_assets / file_path.name
# in case the file already exists, remove it
if target_path.exists():
target_path.unlink()
shutil.copy(file_path, target_path)
# in case the file already exists, remove it
if target_path.exists():
target_path.unlink()
shutil.copy(file_path, target_path)

print(
f"Copied files: {[p.name for p in server_build_static_assets.glob('*')]}"
Expand Down

0 comments on commit bde7fe4

Please sign in to comment.