-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: deploy updated package on merge
- semantic release commit doesn't trigger a github action run
- Loading branch information
1 parent
a6961e5
commit 8ff1f84
Showing
1 changed file
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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 |