mirror of
https://github.com/mtshiba/pylyzer.git
synced 2025-08-04 14:28:24 +00:00
CI: update scripts
This commit is contained in:
parent
0d9b37e006
commit
964a3d1284
3 changed files with 18 additions and 11 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -24,7 +24,8 @@ jobs:
|
|||
run: |
|
||||
rustup update stable
|
||||
cargo login ${{ secrets.CARGO_TOKEN }}
|
||||
./cargo-publish.sh
|
||||
chmod +x cargo_publish.sh
|
||||
./cargo_publish.sh
|
||||
pypi:
|
||||
strategy:
|
||||
matrix:
|
||||
|
|
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
},
|
||||
"python.formatting.provider": "none"
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
if [[ "$PWD" == */pylyzer ]]; then
|
||||
if [ "$PYPI_PASSWORD" = "" ]; then
|
||||
echo "set PYPI_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$1" != "--pip-only" ]; then
|
||||
cd crates/py2erg
|
||||
echo "publish py2erg ..."
|
||||
cargo publish
|
||||
# from cargo 1.66 timeout is not needed
|
||||
# timeout 12
|
||||
cd ../../
|
||||
cargo publish
|
||||
fi
|
||||
maturin build --release
|
||||
ver=`cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'`
|
||||
whl=target/wheels/`ls target/wheels | rg "pylyzer-$ver"`
|
||||
python3 -m twine upload $whl -u mtshiba -p $PYPI_PASSWORD
|
||||
if [ "$1" != "--cargo-only" ]; then
|
||||
if [ "$PYPI_PASSWORD" = "" ]; then
|
||||
echo "set PYPI_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
maturin build --release
|
||||
ver=`cat Cargo.toml | rg "^version =" | sed -r 's/^version = "(.*)"/\1/'`
|
||||
whl=target/wheels/`ls target/wheels | rg "pylyzer-$ver"`
|
||||
python3 -m twine upload $whl -u mtshiba -p $PYPI_PASSWORD
|
||||
fi
|
||||
echo "completed"
|
||||
else
|
||||
echo "use this command in the project root"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue