Change PR steps for brew release

The hub cli tool wasn't working anymore, so we took it out.

Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
Jonathan Wren 2021-03-20 13:08:59 -07:00
parent f849805a73
commit e116a95e34
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A

View file

@ -127,7 +127,7 @@ jobs:
echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV echo "JRNL_VERSION=$JRNL_VERSION" >> $GITHUB_ENV
echo "PYPI_VERSION=$PYPI_VERSION" >> $GITHUB_ENV echo "PYPI_VERSION=$PYPI_VERSION" >> $GITHUB_ENV
- name: Determine type of release - name: Set env variables
env: env:
REPO_OWNER: ${{ github.repository_owner }} REPO_OWNER: ${{ github.repository_owner }}
run: | run: |
@ -158,24 +158,6 @@ jobs:
echo '::debug::Set tap directory' echo '::debug::Set tap directory'
echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV echo "BREW_TAP_DIRECTORY='$(brew --repository)/Library/Taps/${FORMULA_REPO}'" >> $GITHUB_ENV
- name: Config git user
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
git config --local user.name "${{ secrets.JRNL_BOT_NAME }}"
git config --local user.email "${{ secrets.JRNL_BOT_EMAIL }}"
- name: Create branch
working-directory: ${{ env.BREW_TAP_DIRECTORY }}
run: |
BRANCH_NAME="jrnl-${JRNL_VERSION}--${RANDOM}"
git remote rename origin upstream
git remote add origin "https://${{ secrets.JRNL_BOT_NAME }}:${{ secrets.JRNL_BOT_TOKEN }}@github.com/${BOT_REPO}.git"
git fetch upstream
git fetch origin
git checkout -b $BRANCH_NAME
git push -u origin $BRANCH_NAME
- name: Install dependencies - name: Install dependencies
run: brew install pipgrip run: brew install pipgrip
@ -210,29 +192,26 @@ jobs:
--version=$PYPI_VERSION --version=$PYPI_VERSION
--no-audit --no-audit
--write --write
--commit
--force --force
--verbose
- name: Update commit message - name: Create Pull Request
working-directory: ${{ env.BREW_TAP_DIRECTORY }} uses: peter-evans/create-pull-request@v3
run: | with:
git commit --amend \ path: ${{ env.BREW_TAP_DIRECTORY }}
-m "jrnl ${JRNL_VERSION}" \ token: ${{ secrets.JRNL_BOT_TOKEN }}
-m "Update jrnl to ${JRNL_VERSION}" \ push-to-fork: ${{ env.BOT_REPO }}
-m '${{ secrets.RELEASE_COAUTHORS }}'
- name: Push commit committer: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}>
working-directory: ${{ env.BREW_TAP_DIRECTORY }} author: ${{ secrets.JRNL_BOT_NAME }} <${{ secrets.JRNL_BOT_EMAIL }}>
run: |
git show head
git push
- name: Open pull request title: jrnl ${{ env.JRNL_VERSION }}
working-directory: ${{ env.BREW_TAP_DIRECTORY }} body: Created with `brew bump-formula-pr`
env:
GH_TOKEN: ${{ secrets.JRNL_BOT_TOKEN }} branch: jrnl-${{ env.JRNL_VERSION }}--
run: > branch-suffix: random
gh pr create commit-message: |
--title "jrnl ${JRNL_VERSION}" jrnl ${{ env.JRNL_VERSION }}
--body 'Created with `brew bump-formula-pr`.'
Update jrnl to ${{ env.JRNL_VERSION }}
${{ secrets.RELEASE_COAUTHORS }}