Skip to content

Commit

Permalink
fix: deploy updated package on merge
Browse files Browse the repository at this point in the history
 - semantic release commit doesn't trigger a github action run
  • Loading branch information
justindujardin committed May 16, 2022
1 parent a6961e5 commit 8ff1f84
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions tools/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ set -e
. .env/bin/activate
git config --global user.email "[email protected]"
git config --global user.name "justindujardin"


echo "Installing semantic-release requirements"
npm install
echo "Updating build version"
npx ts-node tools/set-build-version.ts

echo "Build and publish to pypi..."
rm -rf build dist
echo "--- Install requirements"
Expand All @@ -20,15 +27,5 @@ set +e
twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
rm -rf build dist


# The build/deploy step runs in two commits. The first runs the tests and generates a
# tag commit, and that tag commit deploys to pypi. To make this work we do the pypi
# bit first, then run semantic-release to bump versions and generate a new commit. This
# way the package is always published from the tag commit, and not accidentally by the
# initiating change because the version was already bumped.
echo "Installing semantic-release requirements"
npm install
echo "Updating build version"
npx ts-node tools/set-build-version.ts
echo "Running semantic-release"
npx semantic-release
npx semantic-release

0 comments on commit 8ff1f84

Please sign in to comment.