Skip to content

Commit

Permalink
Update Version Bump to include Homebrew in PATH (#5963) (#5993)
Browse files Browse the repository at this point in the history
  • Loading branch information
leahwicz authored Oct 3, 2022
1 parent 1aee7b3 commit f903aed
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ jobs:
source env/bin/activate
pip install --upgrade pip
- name: Add Homebrew to PATH
run: |
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Install Homebrew packages
run: |
brew install pre-commit
brew tap miniscruff/changie https://github.com/miniscruff/changie
brew install changie
- name: Audit Version and Parse Into Parts
id: semver
uses: dbt-labs/actions/parse-semver@v1
Expand All @@ -66,18 +76,8 @@ jobs:
env/bin/bumpversion --allow-dirty --new-version ${{ github.event.inputs.version_number }} major
git status
# this step will fail on whitespace errors but also correct them
- name: Format bumpversion file
continue-on-error: true
run: |
brew install pre-commit
pre-commit run trailing-whitespace --files .bumpversion.cfg
git status
- name: Run changie
run: |
brew tap miniscruff/changie https://github.com/miniscruff/changie
brew install changie
if [[ ${{ steps.semver.outputs.is-pre-release }} -eq 1 ]]
then
changie batch ${{ steps.semver.outputs.base-version }} --move-dir '${{ steps.semver.outputs.base-version }}' --prerelease '${{ steps.semver.outputs.pre-release }}'
Expand All @@ -87,6 +87,20 @@ jobs:
changie merge
git status
# this step will fail on whitespace errors but also correct them
- name: Remove trailing whitespace
continue-on-error: true
run: |
pre-commit run trailing-whitespace --files .bumpversion.cfg CHANGELOG.md .changes/*
git status
# this step will fail on newline errors but also correct them
- name: Removing extra newlines
continue-on-error: true
run: |
pre-commit run end-of-file-fixer --files .bumpversion.cfg CHANGELOG.md .changes/*
git status
- name: Commit version bump to branch
uses: EndBug/add-and-commit@v7
with:
Expand Down

0 comments on commit f903aed

Please sign in to comment.