Skip to content

Commit

Permalink
Merge pull request #14 from nsls2-conda-envs/2024-2.0
Browse files Browse the repository at this point in the history
Upload 2024-2.0 tiled envs to Zenodo
  • Loading branch information
mrakitin authored May 7, 2024
2 parents 1f6a363 + 4bca86a commit 28c31c9
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Upload artifacts to Zenodo

on:
push:
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand All @@ -39,26 +39,26 @@ jobs:
run: |
set -vxeuo pipefail
#
# Artifacts from https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363
#
# #
# # Artifacts from https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363
# #
# https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363/artifacts/1184244620
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection 1184244620 2024-1.0-py310
# # https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363/artifacts/1184244620
# bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection 1184244620 2024-1.0-py310
# https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363/artifacts/1184244622
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection 1184244622 2024-1.0-py311
# # https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363/artifacts/1184244622
# bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection 1184244622 2024-1.0-py311
#
# Artifacts from https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/7602968629
# Artifacts from https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/8973247394
#
# https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/7602968629/artifacts/1184137142
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection-tiled 1184137142 2024-1.0-py310-tiled
# https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/8973247394/artifacts/1477366915
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection-tiled 1477366915 2024-1.0-py310-tiled
# https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/7602968629/artifacts/1184137144
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection-tiled 1184137144 2024-1.0-py311-tiled
# https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/8973247394/artifacts/1477371389
bash ${GITHUB_WORKSPACE}/download-artifacts.sh nsls2-collection-tiled 1477371389 2024-1.0-py311-tiled
- name: Upload artifacts to Zenodo
run: |
python3 test-upload.py
python3 upload-artifacts.py
2 changes: 1 addition & 1 deletion download-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ archive_name="${envname}.zip"
curl -L -H "Authorization: token ${GHA_TOKEN}" "https://api.github.com/repos/nsls2-conda-envs/${repo_name}/actions/artifacts/${artifact_id}/zip" > ${archive_name}
unzip -v ${archive_name} # contents info
unzip ${archive_name}
mv -v Dockerfile Dockerfile-${envname}
# mv -v Dockerfile Dockerfile-${envname}
rm -fv ${archive_name}
54 changes: 27 additions & 27 deletions test-upload.py → upload-artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def create_new_version(
newver_draft = ret_newver.json()["links"]["self"]

notes_urls = [
# non-tiled
"https://github.com/nsls2-conda-envs/nsls2-collection/pull/28",
"https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363",
# need this empty line to enforce line break on Zenodo:
"",
# # non-tiled
# "https://github.com/nsls2-conda-envs/nsls2-collection/pull/28",
# "https://github.com/nsls2-conda-envs/nsls2-collection/actions/runs/7603753363",
# # need this empty line to enforce line break on Zenodo:
# "",
# tiled
"https://github.com/nsls2-conda-envs/nsls2-collection-tiled/pull/28",
"https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/7602968629",
"https://github.com/nsls2-conda-envs/nsls2-collection-tiled/pull/29",
"https://github.com/nsls2-conda-envs/nsls2-collection-tiled/actions/runs/8973247394",
]
notes_urls_strs = "<br>\n".join([f'<a href="{url}">{url}</a>'
if url else ""
Expand Down Expand Up @@ -239,7 +239,7 @@ def update_deposition_with_files(conceptrecid=None, files=None, token=None):
if __name__ == "__main__":

conceptrecid = "4057062"
version = "2024-1.0"
version = "2024-2.0"
token = os.environ["ZENODO_TOKEN"]

resp = create_new_version(
Expand All @@ -265,21 +265,21 @@ def update_deposition_with_files(conceptrecid=None, files=None, token=None):
# f"runner-{version}-py39.sh": "r",
# f"{version}-py39.tar.gz": "rb",

# Python 3.10 (non-tiled)
f"{version}-py310-md5sum.txt": "r",
f"{version}-py310-sha256sum.txt": "r",
f"{version}-py310.yml": "r",
f"Dockerfile-{version}-py310": "r",
f"runner-{version}-py310.sh": "r",
f"{version}-py310.tar.gz": "rb",

# Python 3.11 (non-tiled)
f"{version}-py311-md5sum.txt": "r",
f"{version}-py311-sha256sum.txt": "r",
f"{version}-py311.yml": "r",
f"Dockerfile-{version}-py311": "r",
f"runner-{version}-py311.sh": "r",
f"{version}-py311.tar.gz": "rb",
# # Python 3.10 (non-tiled)
# f"{version}-py310-md5sum.txt": "r",
# f"{version}-py310-sha256sum.txt": "r",
# f"{version}-py310.yml": "r",
# f"Dockerfile-{version}-py310": "r",
# f"runner-{version}-py310.sh": "r",
# f"{version}-py310.tar.gz": "rb",

# # Python 3.11 (non-tiled)
# f"{version}-py311-md5sum.txt": "r",
# f"{version}-py311-sha256sum.txt": "r",
# f"{version}-py311.yml": "r",
# f"Dockerfile-{version}-py311": "r",
# f"runner-{version}-py311.sh": "r",
# f"{version}-py311.tar.gz": "rb",

# # Python 3.8 (tiled)
# f"{version}-py38-tiled-md5sum.txt": "r",
Expand All @@ -301,16 +301,16 @@ def update_deposition_with_files(conceptrecid=None, files=None, token=None):
f"{version}-py310-tiled-md5sum.txt": "r",
f"{version}-py310-tiled-sha256sum.txt": "r",
f"{version}-py310-tiled.yml": "r",
f"Dockerfile-{version}-py310-tiled": "r",
f"runner-{version}-py310-tiled.sh": "r",
# f"Dockerfile-{version}-py310-tiled": "r",
# f"runner-{version}-py310-tiled.sh": "r",
f"{version}-py310-tiled.tar.gz": "rb",

# Python 3.11 (tiled)
f"{version}-py311-tiled-md5sum.txt": "r",
f"{version}-py311-tiled-sha256sum.txt": "r",
f"{version}-py311-tiled.yml": "r",
f"Dockerfile-{version}-py311-tiled": "r",
f"runner-{version}-py311-tiled.sh": "r",
# f"Dockerfile-{version}-py311-tiled": "r",
# f"runner-{version}-py311-tiled.sh": "r",
f"{version}-py311-tiled.tar.gz": "rb",
},
)
Expand Down

0 comments on commit 28c31c9

Please sign in to comment.