name: Publish LangChain Arcade on: workflow_dispatch: inputs: version: description: "Version to release (leave empty to use version from pyproject.toml)" required: false jobs: test-and-publish: runs-on: ubuntu-latest permissions: contents: write packages: write id-token: write steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up the environment uses: ./.github/actions/setup-uv-env with: python-version: "3.11" working-directory: contrib/langchain - name: Test LangChain Arcade working-directory: contrib/langchain run: | make install make check make test - name: Set version if provided if: inputs.version != '' working-directory: contrib/langchain run: | uv version ${{ inputs.version }} - name: Build release distributions working-directory: contrib/langchain run: | VERSION=$(uv version --short) echo "VERSION=$VERSION" >> $GITHUB_ENV uv build --out-dir dist | tee build.log # Verify build artifacts ls -la dist/ echo "Built artifacts for langchain_arcade v${{ env.VERSION }}" - name: Upload release distributions uses: actions/upload-artifact@v4 with: name: release-dists-langchain_arcade-${{ env.VERSION }} path: dist/ - name: Publish release distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - name: Send status to Slack if: always() uses: slackapi/slack-github-action@v2.0.0 with: webhook: ${{ secrets.PACKAGE_RELEASE_SLACK_WEBHOOK_URL }} webhook-type: webhook-trigger payload: | { "status": "${{ job.status == 'failure' || job.status == 'cancelled' && 'Failed' || 'Success' }}", "package": "langchain_arcade", "version": "${{ env.VERSION }}", "url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" }