@@ -35,33 +35,41 @@ jobs:
3535 curl -L $TAR_URL -o release.tar.gz
3636 SHA256=$(sha256sum release.tar.gz | cut -d' ' -f1)
3737 echo "SHA256=$SHA256" >> $GITHUB_OUTPUT
38+ # Extract OWNER and REPO from GITHUB_REPOSITORY (format: owner/repo)
39+ REPO_OWNER=${GITHUB_REPOSITORY%%/*}
40+ echo "REPO_OWNER=$REPO_OWNER" >> $GITHUB_OUTPUT
41+ REPO_NAME=${GITHUB_REPOSITORY##*/}
42+ echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT
43+ REPO_HOME="https://github.com/${GITHUB_REPOSITORY}"
44+ echo "REPO_HOME=$REPO_HOME" >> $GITHUB_OUTPUT
45+ echo "$GITHUB_OUTPUT"
3846
3947 # 4) Update meta.yaml with the correct version and sha256
4048 - name : Patch conda-recipe/meta.yaml
4149 run : |
4250 cd conda-recipe
4351
44- # Extract OWNER and REPO from GITHUB_REPOSITORY (format: owner/repo)
45- OWNER=${GITHUB_REPOSITORY%%/*}
46- REPO=${GITHUB_REPOSITORY##*/}
47-
52+ # Replace the Jinja “{% set name = "..." %}” line:
53+ sed -i "s|^{% set name = \".*\" %}|{% set name = \"${{ steps.vars.outputs.REPO_NAME }}\" %}|" meta.yaml
54+
4855 # Replace the Jinja “{% set version = "..." %}” line:
4956 sed -i "s|^{% set version = \".*\" %}|{% set version = \"${{ steps.vars.outputs.VERSION }}\" %}|" meta.yaml
50-
51- # Replace the “ sha256: ...” line (two‐space indentation under source:)
52- sed -i "s|^ sha256: .*| sha256: ${{ steps.vars.outputs.SHA256 }}|" meta.yaml
5357
5458 # Update the source URL to use the real owner, repo, and version
5559 # Original line looks like:
5660 # url: <PLACEHOLDER>
57- sed -i "s|^ url: .*| url: https://github.com/${OWNER}/${REPO}/archive/v${{ steps.vars.outputs.VERSION }}.tar.gz|" meta.yaml
61+ sed -i "s|^ url: .*| url: ${{ steps.vars.outputs.TAR_URL }}|" meta.yaml
62+
63+ # Replace the “ sha256: ...” line (two‐space indentation under source:)
64+ # Original line looks like:
65+ # sha256: <PLACEHOLDER>
66+ sed -i "s|^ sha256: .*| sha256: ${{ steps.vars.outputs.SHA256 }}|" meta.yaml
5867
5968 # Update the homepage URL to use the real owner and repo
6069 # Original line looks like:
6170 # home: <PLACEHOLDER>
62- sed -i "s|^ home: .*| home: https://github.com/${OWNER}/${REPO }|" meta.yaml
71+ sed -i "s|^ home: .*| home: ${{ steps.vars.outputs.REPO_HOME } }|" meta.yaml
6372
64- # check meta.yaml contents
6573 cat meta.yaml
6674
6775 # 5) Build the conda package
0 commit comments