Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,20 @@ jobs:
- name: Pin README to release SHA
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ github.token }}
run: |
sed -i -E \
's|developmentseed/python-security-auditing@[^ ]+( # v[0-9][^ ]*)?|developmentseed/python-security-auditing@${{ steps.release.outputs.sha }} # ${{ steps.release.outputs.tag_name }}|g' \
README.md
git add README.md
git diff --cached --quiet && echo "README unchanged, skipping commit" && exit 0
git commit -m "chore: pin README to ${{ steps.release.outputs.tag_name }} [skip ci]"
git push origin HEAD:main
BRANCH="chore/pin-readme-${{ steps.release.outputs.tag_name }}"
git checkout -b "$BRANCH"
git commit -m "chore: pin README to ${{ steps.release.outputs.tag_name }}"
git push origin "$BRANCH"
gh pr create \
--title "chore: pin README to ${{ steps.release.outputs.tag_name }}" \
--body "Automated: pin README SHA references to release ${{ steps.release.outputs.tag_name }}." \
--base main \
--head "$BRANCH"
gh pr merge --auto --squash "$BRANCH"
Loading