Skip to content

Commit 07ada0f

Browse files
authored
chore: automate README version bumping (#1763)
Closes #1420.
1 parent f8d4eb6 commit 07ada0f

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/release-please.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,24 @@
5353
if: ${{ steps.release.outputs.release_created }}
5454
run: |
5555
git config user.name "GitHub Actions"
56-
git config user.email "github-aws-sdk-osds-automation@amazon.com
56+
git config user.email "github-aws-sdk-osds-automation@amazon.com"
5757
if git rev-parse "v${{ steps.release.outputs.major }}" >/dev/null 2>&1; then
5858
git tag -d "v${{ steps.release.outputs.major }}"
5959
git push origin ":v${{ steps.release.outputs.major }}"
6060
fi
6161
git tag -a "v${{ steps.release.outputs.major }}" -m "Release v${{ steps.release.outputs.major }}"
6262
git push origin "v${{ steps.release.outputs.major }}"
63+
64+
- name: Update README version references
65+
if: ${{ steps.release.outputs.release_created }}
66+
run: |
67+
sed -i 's|configure-aws-credentials@v[0-9]*\.[0-9]*\.[0-9]*|configure-aws-credentials@${{ steps.release.outputs.tag_name }}|g' README.md
68+
if git diff --quiet README.md; then
69+
echo "README already up to date"
70+
else
71+
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}"
72+
git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
73+
git add README.md
74+
git commit -m "docs: update README version references to ${{ steps.release.outputs.tag_name }}"
75+
git push --force origin
76+
fi

0 commit comments

Comments
 (0)