Skip to content

ci: bump actions/setup-python from 5.5.0 to 6.2.0 (#1) #10

ci: bump actions/setup-python from 5.5.0 to 6.2.0 (#1)

ci: bump actions/setup-python from 5.5.0 to 6.2.0 (#1) #10

name: Release Please
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4.4.0
id: release
with:
release-type: python
# Move major version tag (e.g. v1) after a release is cut
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: ${{ steps.release.outputs.release_created }}
with:
persist-credentials: false
- name: Tag major version
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
git tag -fa "v${{ steps.release.outputs.major }}" \
-m "Release v${{ steps.release.outputs.tag_name }}"
git push origin "v${{ steps.release.outputs.major }}" --force
- name: Pin README to release SHA
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
sed -i \
'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