Skip to content

Commit b91d6b8

Browse files
authored
build wheel for pypi package (#2314)
1 parent 1ff8cce commit b91d6b8

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/milestone-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ jobs:
5252
git remote add trigger [email protected]:beautifier/js-beautify.git
5353
git fetch --all
5454
- name: Install python twinE
55-
run: pip install twine
55+
run: pip install twine wheel
5656
- name: Run release script for ${{ github.event.milestone.title }}
57-
env:
57+
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
6060
MILESTONE_VERSION: ${{ github.event.milestone.title }}
6161
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
62-
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
63-
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
62+
TWINE_USERNAME: ${{secrets.PYPI_USERNAME}}
63+
TWINE_PASSWORD: ${{secrets.PYPI_PASSWORD}}
6464
run: |
6565
./tools/release-all.sh ${MILESTONE_VERSION}

tools/release-all.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ release_python()
1717
git fetch --all || exit 1
1818

1919
git checkout -B staging/release origin/staging/release
20-
git clean -xfd || exit 1
20+
git clean -xfd || exit 1
2121
cd python
2222
# python setup.py register -r pypi
2323
cp setup-js.py setup.py || exit 1
24-
python setup.py sdist || exit 1
24+
python setup.py sdist bdist_wheel || exit 1
2525
cp setup-css.py setup.py || exit 1
26-
python setup.py sdist || exit 1
26+
python setup.py sdist bdist_wheel || exit 1
2727
rm setup.py || exit 1
2828
python -m twine upload dist/* || exit 1
2929
}
@@ -57,7 +57,7 @@ release_web()
5757
git checkout -B staging/main site/staging/main || exit 1
5858
git reset --hard site/main || exit 1
5959
git merge origin/staging/main --no-edit || exit 1
60-
git push || exit 1
60+
git push || exit 1
6161
}
6262

6363
sedi() {
@@ -113,7 +113,7 @@ update_release_branch()
113113
git add -f js/test/generated/
114114
git add -f python/jsbeautifier/tests/generated/
115115
git add -f python/cssbeautifier/tests/generated/
116-
116+
117117
git commit -m "Release: $NEW_VERSION"
118118
git tag "v$NEW_VERSION" || exit 1
119119
git push || exit 1
@@ -130,7 +130,7 @@ main()
130130
if [[ ! $NEW_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9].*$ ]]; then
131131
echo Version number must start with MAJOR.MINOR.INCREMENTAL numbering.
132132
exit 1
133-
fi
133+
fi
134134

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

0 commit comments

Comments
 (0)