Skip to content

Commit

Permalink
Fix pypi CI (#59)
Browse files Browse the repository at this point in the history
* check out main?

* check out new branch

* one more attempt

* well

* simpler way

* revert something

* every possible error

---------

Co-authored-by: Kaiyu Zheng <kzheng@theaiinstitute.com>
  • Loading branch information
zkytony and kaiyu-zheng committed Mar 13, 2024
1 parent c12f38c commit dfe5d7c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 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 "VERSION=\"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 @@ -61,7 +61,7 @@ jobs:
- name: Release artifact
uses: softprops/action-gh-release@v1
with:
name: ${{ env.VERSION }}
name: ${{ env.RELEASE_NAME }}
files: dist/*.whl


Expand All @@ -83,12 +83,19 @@ jobs:
steps:
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/v')
run: echo "VERSION=\"Version ${{ github.ref_name }}\"" >> $GITHUB_ENV
run: |
TAG=${{ github.ref_name }}
echo "RELEASE_NAME=\"Version $TAG\"" >> $GITHUB_ENV
echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/checkout@v4
with:
ref: "dev-${{ env.VERSION }}"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -105,11 +112,11 @@ jobs:
# This will upload stuff under dist/ to PyPI
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
repository_url: https://pypi.org/
repository_url: https://upload.pypi.org/legacy/
skip-existing: true

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

0 comments on commit dfe5d7c

Please sign in to comment.