chore: Hotfix release v1.1.2 - Profile CLI override bug #20
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unified Release Pipeline | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| tag_name: | |
| description: 'Tag name (e.g. v0.1.1)' | |
| required: true | |
| jobs: | |
| publish-pypi: | |
| name: Build and publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| url: https://pypi.org/p/devin-cli | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.9" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build binary wheel and source tarball | |
| run: python -m build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| update-homebrew: | |
| name: Update Homebrew Formula | |
| needs: publish-pypi | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Get Version and Hash | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| VERSION=${{ github.event.inputs.tag_name }} | |
| VERSION=${VERSION#v} | |
| fi | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| # Construct source URL and fetch to get the hash | |
| URL="https://files.pythonhosted.org/packages/source/d/devin-cli/devin_cli-$VERSION.tar.gz" | |
| echo "URL=$URL" >> $GITHUB_ENV | |
| # Wait a few seconds for PyPI CDN to catch up | |
| echo "Waiting 30 seconds for PyPI CDN to propagate..." | |
| sleep 30 | |
| curl -sL $URL -o devin_cli.tar.gz | |
| HASH=$(sha256sum devin_cli.tar.gz | awk '{print $1}') | |
| echo "HASH=$HASH" >> $GITHUB_ENV | |
| - name: Update Homebrew Formula | |
| uses: mislav/bump-homebrew-formula-action@v3 | |
| with: | |
| formula-name: devin-cli | |
| homebrew-tap: revanthpobala/homebrew-tap | |
| base-branch: main | |
| download-url: ${{ env.URL }} | |
| commit-message: "Update devin-cli to ${{ env.VERSION }}" | |
| env: | |
| COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} |