Skip to content

Commit

Permalink
Minor pypi CI (#62)
Browse files Browse the repository at this point in the history
* no quotes

* no need to release for vdev-latest to avoid clash with build wheel workflow

* name fix!
  • Loading branch information
kaiyu-zheng committed Mar 29, 2024
1 parent 8e867f3 commit 757e51a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/pypi_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/v')
run: echo "RELEASE_NAME=\"Version ${{ github.ref_name }}\"" >> $GITHUB_ENV
run: echo "RELEASE_NAME=Version ${{ github.ref_name }}" >> $GITHUB_ENV

- uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -58,12 +58,6 @@ jobs:
repository_url: https://test.pypi.org/legacy/
skip-existing: true

- name: Release artifact
uses: softprops/action-gh-release@v1
with:
name: ${{ env.RELEASE_NAME }}
files: dist/*.whl


pypi-publish:
name: publish to PyPi
Expand Down
4 changes: 2 additions & 2 deletions scripts/pomdp_py_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ find_pxd_files_and_write_manifest ./ MANIFEST.in
version=$(extract_package_version "$pomdp_py_path/pyproject.toml")
attempt_count=""
if [ $# -gt 0 ]; then
attempt_count="-$1-"
attempt_count="-$1"
fi
echo $version
if ! is_git_repo_on_branch $pomdp_py_path dev-$version; then
Expand Down Expand Up @@ -114,7 +114,7 @@ command="auditwheel repair io/dist/${wheel_name} -w /io/wheelhouse/"
docker run --user $(id -u):$(id -g) --mount type=bind,source=${pomdp_py_path},target=/io $manylinux_image bash -c "$command"
rm $pomdp_py_path/dist/$wheel_name
fixed_wheel_name="pomdp_py-${version}-${cpv}-${cpv}-manylinux_2_17_x86_64.$linux_dist.whl"
fixed_wheel_name_with_attempt="pomdp_py-${version}${attempt_count}${cpv}-${cpv}-manylinux_2_17_x86_64.$linux_dist.whl"
fixed_wheel_name_with_attempt="pomdp_py-${version}${attempt_count}-${cpv}-${cpv}-manylinux_2_17_x86_64.$linux_dist.whl"
mv "$pomdp_py_path/wheelhouse/$fixed_wheel_name" "$pomdp_py_path/dist/$fixed_wheel_name_with_attempt"
rm -r $pomdp_py_path/wheelhouse

Expand Down

0 comments on commit 757e51a

Please sign in to comment.