Bug fixes to update PHP repo GHA.

Pull the first index with jq instead of looking for "main"
Git add all artifacts since "git commit -a" doesn't add new ones

PiperOrigin-RevId: 506933714
pull/11797/head
Deanna Garcia 2 years ago
parent 6542b667ff
commit 7be7cafe69
  1. 5
      .github/workflows/update_php_repo.yml

@ -29,7 +29,7 @@ jobs:
git config user.email "protobuf-team-bot@google.com" git config user.email "protobuf-team-bot@google.com"
- name: Get PHP Version - name: Get PHP Version
run: | run: |
unformatted_version=$( cat protobuf/version.json | jq -r '.main.languages.php' ) unformatted_version=$( cat protobuf/version.json | jq -r '.[].languages.php' )
version=${unformatted_version/-rc/RC} version=${unformatted_version/-rc/RC}
version_tag=v$version version_tag=v$version
echo "VERSION=$version" >> $GITHUB_ENV echo "VERSION=$version" >> $GITHUB_ENV
@ -42,7 +42,8 @@ jobs:
rm -rf protobuf rm -rf protobuf
- name: Push Changes - name: Push Changes
run: | run: |
git commit -a -m "${{ env.VERSION }} sync" git add --all
git commit -m "${{ env.VERSION }} sync"
git push --force origin master git push --force origin master
git tag -a ${{ env.VERSION_TAG }} -m "Tag release ${{ env.VERSION_TAG }}" git tag -a ${{ env.VERSION_TAG }} -m "Tag release ${{ env.VERSION_TAG }}"
git push origin ${{ env.VERSION_TAG }} git push origin ${{ env.VERSION_TAG }}

Loading…
Cancel
Save