diff --git a/.github/workflows/publish_pip.yml b/.github/workflows/publish_pip.yml index c8e3939..8c84e4d 100644 --- a/.github/workflows/publish_pip.yml +++ b/.github/workflows/publish_pip.yml @@ -30,8 +30,12 @@ jobs: run: pip install build - name: Set version from run number - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.1.dev${{ github.run_number }}" >> $GITHUB_ENV + run: | + if [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref }}" = "refs/heads/main" ]; then + echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.1.${{ github.run_number }}" >> $GITHUB_ENV + else + echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.0.dev0" >> $GITHUB_ENV + fi - name: Build wheel run: python -m build @@ -100,8 +104,8 @@ jobs: - name: Create Release uses: softprops/action-gh-release@v2 with: - tag_name: v0.1.dev${{ github.run_number }} - name: truffile v0.1.dev${{ github.run_number }} + tag_name: v0.1.${{ github.run_number }} + name: truffile v0.1.${{ github.run_number }} files: dist/*.whl generate_release_notes: true make_latest: true