Skip to content

Commit

Permalink
run checks for any push to changeset-relrease/prerelease branch
Browse files Browse the repository at this point in the history
no harm in not uninstalling yarn
add back pretty-quick (how we missed you)
  • Loading branch information
aaronmgdr committed Oct 26, 2023
1 parent 8cc603e commit 8ee5060
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,4 @@ jobs:
NPM_TOKEN: ${{ env.NPM_TOKEN }}
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
- name: Remove Yarn
# https://github.com/actions/setup-node/issues/182
if: always()
run: npm uninstall -g yarn
publish: yarn release
1 change: 1 addition & 0 deletions .github/workflows/social-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- main
- changeset-release/prerelease/*
pull_request:
branches:
- main
Expand Down
16 changes: 9 additions & 7 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/usr/bin/env bash
. "$(dirname -- "$0")/_/husky.sh"

# pretty-quick --staged --pattern '**/*.+(ts|js)'
yarn pretty-quick --staged --pattern '**/*.+(ts|js)'

branch="$(git rev-parse --abbrev-ref HEAD)"
if [[ $branch == prerelease* ]]; then
BRANCH="$(git rev-parse --abbrev-ref HEAD)"

# Ensure that its not possible to commit to a prerelease branch without a pre.json file
if [[ $BRANCH == prerelease* ]]; then
echo "checking for pre.json"
PRE_JSON=.changeset/pre.json
if test -f "$PRE_JSON"; then
echo "$PRE_JSON exists."
PRE_FILE=.changeset/pre.json
if test -f "$PRE_FILE"; then
echo "$PRE_FILE exists."
else
echo "$PRE_JSON does not exist. Run yarn beta-enter to create it."
echo "$PRE_FILE does not exist. Run yarn beta-enter to create it."
exit 1
fi
fi

0 comments on commit 8ee5060

Please sign in to comment.