Skip to content

chore: release 0.89.1 #436

chore: release 0.89.1

chore: release 0.89.1 #436

Workflow file for this run

name: Release and PyPI Publish
# Requires ADMIN_TOKEN secret (GitHub PAT with repo scope) to push release
# commits to protected branches. Without it, the tag gets created but the
# version bump commit is rejected by branch protection, orphaning the tag.
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ secrets.ADMIN_TOKEN }}
- name: Check if should skip
id: check_skip
run: |
if [ "$(git log -1 --pretty=format:'%an')" = "semantic-release" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
fi
- name: Python Semantic Release
if: steps.check_skip.outputs.skip != 'true'
id: release
uses: python-semantic-release/python-semantic-release@7b3f71697ccfbaef884e1e754b6364e974b134cf # v9.15.2
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
- name: Publish to PyPI
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
- name: Publish to GitHub Releases
if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'
uses: python-semantic-release/publish-action@b9c41d4b0754dee5a6c7188d42b33f66e3a8aafd # v9.15.2
with:
github_token: ${{ secrets.ADMIN_TOKEN }}
# Releases in openadapt-ml failed silently for 3 months (Mar-Jun
# 2026) while PyPI went stale; see OpenAdaptAI/OpenAdapt#999.
- name: File issue on release failure
if: failure()
env:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }}
run: |
TITLE="Release workflow failed on main"
BODY="The release workflow failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Until this is fixed, merged fix/feat commits are NOT being published to PyPI, and users install stale versions."
EXISTING=$(gh issue list --repo "${{ github.repository }}" --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number // empty')
if [ -n "$EXISTING" ]; then
gh issue comment "$EXISTING" --repo "${{ github.repository }}" --body "$BODY"
else
gh issue create --repo "${{ github.repository }}" --title "$TITLE" --body "$BODY"
fi