Repository navigation
Set up releases to PyPI, and prepare the first release #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e8f4ff5
Set up releases to PyPI
rohan-hotdata 4de87a1
Prepare the first release: the changelog, the CI pins, and the privac…
rohan-hotdata 9ffaacd
Keep the notes of the owner out of git, and make the architecture public
rohan-hotdata 067676b
Ignore the local state of Claude Code, and raise the pyarrow floor of…
rohan-hotdata 2d5eee6
README: how to install the skill
rohan-hotdata 3522d1f
README: name no specific coding agent in the skill steps
rohan-hotdata 5b41ebb
publish.yml stops when the tagged commit is not on main
rohan-hotdata File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| - package-ecosystem: uv | ||
| directory: "/" | ||
| schedule: | ||
| interval: weekly | ||
| allow: | ||
| - dependency-name: hotdata-framework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: check-release | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - pyproject.toml | ||
| - CHANGELOG.md | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| changelog: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Check that a version change has a changelog section | ||
| run: python3 scripts/changelog.py check "origin/$GITHUB_BASE_REF" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| name: publish | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v[0-9]*" | ||
|
|
||
| concurrency: | ||
| group: publish-${{ github.ref_name }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Check that the tagged commit is on main | ||
| run: | | ||
| if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then | ||
| echo "The tag $GITHUB_REF_NAME points at $GITHUB_SHA, which is not on main" >&2 | ||
| exit 1 | ||
| fi | ||
| - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v6 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Check that the tag matches the project version | ||
| run: | | ||
| version=$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") | ||
| if [[ "$GITHUB_REF_NAME" != "v$version" ]]; then | ||
| echo "The tag $GITHUB_REF_NAME does not match version $version in pyproject.toml" >&2 | ||
| exit 1 | ||
| fi | ||
| - name: Check that CHANGELOG.md has a section for the version | ||
| run: python3 scripts/changelog.py notes "${GITHUB_REF_NAME#v}" > /dev/null | ||
| - run: uv build | ||
| - run: uvx twine check --strict dist/* | ||
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
|
|
||
| pypi: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/hotmemory | ||
| permissions: | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 | ||
|
|
||
| github-release: | ||
| needs: pypi | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 | ||
| with: | ||
| name: dist | ||
| path: dist/ | ||
| - name: Create the GitHub Release with the changelog notes | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| python3 scripts/changelog.py notes "${GITHUB_REF_NAME#v}" > notes.md | ||
| gh release create "$GITHUB_REF_NAME" dist/* \ | ||
| --title "hotmemory ${GITHUB_REF_NAME#v}" \ | ||
| --notes-file notes.md \ | ||
| --verify-tag | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Add a check that the tagged commit is on
main(not blocking).Suggested step after the checkout, with
fetch-depth: 0on the checkout:The workflow publishes any
v*tag whose version matchespyproject.toml. A tag pushed from a feature branch publishes unreviewed code to PyPI.RELEASING.md:4says to tag only throughrelease.sh, and the workflow does not enforce that rule. A tag rule on thepypienvironment is an alternative fix.