Skip to content

Commit

Permalink
♻️ Add tap and re-clone with token
Browse files Browse the repository at this point in the history
  • Loading branch information
phatblat committed Aug 3, 2024
1 parent c073f0a commit d202441
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,29 +148,33 @@ jobs:
- name: 🔧 Configure Git Credentials
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
# This is necessary to avoid the following error:
# Error: No available formula or cask with the name "mas-cli/tap/mas".
- name: 🚰 Checkout mas tap
run: |
brew tap mas-cli/tap
rm -rf /opt/homebrew/Library/Taps/mas-cli/homebrew-tap
# Checkout with a token for write access
- name: 🚰 Re-clone mas tap
uses: actions/checkout@v4
with:
repository: mas-cli/homebrew-tap
token: ${{ secrets.DEPLOY_TOKEN }}
# Relative path under $GITHUB_WORKSPACE to place the repository
path: mas-tap
# brew --repository mas-cli/tap
path: /opt/homebrew/Library/Taps/mas-cli/homebrew-tap

- name: ⤴️ Open mas tap PR
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
DRY_RUN: ${{ needs.start.outputs.dry_run }}
RELEASE_BRANCH: ${{ needs.start.outputs.release_branch }}
MAS_VERSION: ${{ needs.start.outputs.mas_version }}
working-directory: mas-tap
working-directory: /opt/homebrew/Library/Taps/mas-cli/homebrew-tap
run: |
mkdir -p "$(brew --repository)/Library/Taps/mas-cli"
ln -s . "$(brew --repository)/Library/Taps/mas-cli/homebrew-tap"
brew tap
git branch "${RELEASE_BRANCH}"
git switch "${RELEASE_BRANCH}"
Expand Down
1 change: 1 addition & 0 deletions script/bottle
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ OLD_FILENAME="mas--${MAS_VERSION}.${CURRENT_PLATFORM}.bottle.tar.gz"
# brew update

# Audit formula
brew list mas-cli/tap/mas
brew audit --strict mas-cli/tap/mas
brew style mas-cli/tap/mas

Expand Down

0 comments on commit d202441

Please sign in to comment.