Skip to content

Commit

Permalink
build wheel for pypi package
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Sep 15, 2024
1 parent 1ff8cce commit ec87ca0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/milestone-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ jobs:
git remote add trigger [email protected]:beautifier/js-beautify.git
git fetch --all
- name: Install python twinE
run: pip install twine
run: pip install twine wheel
- name: Run release script for ${{ github.event.milestone.title }}
env:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
MILESTONE_VERSION: ${{ github.event.milestone.title }}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
run: |
./tools/release-all.sh ${MILESTONE_VERSION}
12 changes: 6 additions & 6 deletions tools/release-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ release_python()
git fetch --all || exit 1

git checkout -B staging/release origin/staging/release
git clean -xfd || exit 1
git clean -xfd || exit 1
cd python
# python setup.py register -r pypi
cp setup-js.py setup.py || exit 1
python setup.py sdist || exit 1
python setup.py sdist bdist_wheel || exit 1
cp setup-css.py setup.py || exit 1
python setup.py sdist || exit 1
python setup.py sdist bdist_wheel || exit 1
rm setup.py || exit 1
python -m twine upload dist/* || exit 1
}
Expand Down Expand Up @@ -57,7 +57,7 @@ release_web()
git checkout -B staging/main site/staging/main || exit 1
git reset --hard site/main || exit 1
git merge origin/staging/main --no-edit || exit 1
git push || exit 1
git push || exit 1
}

sedi() {
Expand Down Expand Up @@ -113,7 +113,7 @@ update_release_branch()
git add -f js/test/generated/
git add -f python/jsbeautifier/tests/generated/
git add -f python/cssbeautifier/tests/generated/

git commit -m "Release: $NEW_VERSION"
git tag "v$NEW_VERSION" || exit 1
git push || exit 1
Expand All @@ -130,7 +130,7 @@ main()
if [[ ! $NEW_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9].*$ ]]; then
echo Version number must start with MAJOR.MINOR.INCREMENTAL numbering.
exit 1
fi
fi

npm --version > /dev/null || {
echo ERROR: npm must be installed before attempting release
Expand Down

0 comments on commit ec87ca0

Please sign in to comment.