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@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version-file: ".python-version" - name: Install uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: version: "latest" enable-cache: false - 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 env: GH_TOKEN: ${{ github.token }} TAG: ${{ github.event.release.tag_name }} run: | gh release upload "$TAG" \ osprey_rpc/dist/osprey_rpc-*.tar.gz \ osprey_rpc/dist/osprey_rpc-*.zip