name: Release osprey-rpc on: release: types: [published] jobs: build-osprey-rpc: runs-on: ubuntu-24.04 permissions: contents: write steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v6 with: python-version-file: ".python-version" - name: Install uv uses: astral-sh/setup-uv@v7 with: version: "latest" - name: Build osprey-rpc sdist working-directory: osprey_rpc run: uv build --sdist - name: Create zip from sdist working-directory: osprey_rpc/dist run: | tar -xzf osprey_rpc-*.tar.gz SDIST_DIR=$(ls -d osprey_rpc-*/) SDIST_DIR=${SDIST_DIR%/} zip -r "${SDIST_DIR}.zip" "${SDIST_DIR}" rm -rf "${SDIST_DIR}" ls -la - name: Upload osprey-rpc to release uses: softprops/action-gh-release@v2 with: files: | osprey_rpc/dist/osprey_rpc-*.tar.gz osprey_rpc/dist/osprey_rpc-*.zip