diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3eab1ca..279ca58 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,6 @@ name: Build and Release on: push: branches: [main] - tags: ['v*'] pull_request: branches: [main] @@ -29,7 +28,7 @@ jobs: - name: Test wheel installs and imports run: | pip install dist/*.whl - python -c "from truffile import TruffleClient; print('✓ Import OK')" + python -c "from truffile import TruffleClient; print('Import OK')" truffile --help - name: Upload wheel artifact @@ -44,3 +43,24 @@ jobs: name: truffile-sdist path: dist/*.tar.gz + release: + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + permissions: + contents: write + steps: + - name: Download wheel + uses: actions/download-artifact@v4 + with: + name: truffile-wheel + path: dist/ + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + tag_name: build-${{ github.run_number }} + name: truffile build ${{ github.run_number }} + files: dist/*.whl + generate_release_notes: true + make_latest: true \ No newline at end of file