diff --git a/.github/workflows/pypi_deployment.yml b/.github/workflows/pypi_deployment.yml index 5ce143d..4abce5e 100644 --- a/.github/workflows/pypi_deployment.yml +++ b/.github/workflows/pypi_deployment.yml @@ -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: @@ -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 @@ -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 @@ -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