Skip to content

Commit 5e822b9

Browse files
YujiaBaoclaude
andauthored
Fix YAML parsing errors in nightly and publish-pypi workflows (#490)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f483542 commit 5e822b9

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.github/workflows/nightly.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
run: uv build
3333

3434
- name: smoke test
35-
run: uv run python -c "import tinker_cookbook; print(f'Version: {tinker_cookbook.__version__}')"
35+
run: |
36+
uv run python -c "import tinker_cookbook; print(f'Version: {tinker_cookbook.__version__}')"
3637
3738
- name: get version
3839
id: version
@@ -54,20 +55,23 @@ jobs:
5455

5556
- name: create nightly release
5657
run: |
58+
VERSION="${{ steps.version.outputs.version }}"
59+
REPO="${{ github.repository }}"
60+
SHORT_SHA="${GITHUB_SHA::8}"
61+
{
62+
echo "Automated nightly build from \`main\` at $(date -u '+%Y-%m-%d %H:%M UTC')."
63+
echo ""
64+
echo "**Version:** \`${VERSION}\`"
65+
echo "**Commit:** [\`${SHORT_SHA}\`](https://github.com/${REPO}/commit/${GITHUB_SHA})"
66+
echo ""
67+
echo "### Install"
68+
echo "\`\`\`bash"
69+
echo "pip install 'tinker_cookbook @ https://github.com/${REPO}/releases/download/nightly/tinker_cookbook-${VERSION}-py3-none-any.whl'"
70+
echo "\`\`\`"
71+
} > /tmp/release-notes.md
5772
gh release create nightly dist/* \
5873
--prerelease \
59-
--title "Nightly Build (${{ steps.version.outputs.version }})" \
60-
--notes "$(cat <<EOF
61-
Automated nightly build from \`main\` at $(date -u '+%Y-%m-%d %H:%M UTC').
62-
63-
**Version:** \`${{ steps.version.outputs.version }}\`
64-
**Commit:** [\`${GITHUB_SHA::8}\`](https://github.com/${{ github.repository }}/commit/${GITHUB_SHA})
65-
66-
### Install
67-
\`\`\`bash
68-
pip install 'tinker_cookbook @ https://github.com/${{ github.repository }}/releases/download/nightly/tinker_cookbook-${{ steps.version.outputs.version }}-py3-none-any.whl'
69-
\`\`\`
70-
EOF
71-
)"
74+
--title "Nightly Build (${VERSION})" \
75+
--notes-file /tmp/release-notes.md
7276
env:
7377
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish-pypi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ jobs:
5353
fi
5454
5555
- name: run smoke test
56-
run: uv run python -c "import tinker_cookbook; print(f'Version: {tinker_cookbook.__version__}')"
56+
run: |
57+
uv run python -c "import tinker_cookbook; print(f'Version: {tinker_cookbook.__version__}')"
5758
5859
- name: publish
5960
run: uv publish --token="$PYPI_TOKEN"

0 commit comments

Comments
 (0)