Merge pull request #1761 from dandi/enh-test-versions #764
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: Auto-release on PR merge | |
| on: | |
| # ATM, this is the closest trigger to a PR merging | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| auto-release: | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download latest auto | |
| run: | | |
| auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" | |
| wget -O- "$auto_download_url" | gunzip > ~/auto | |
| chmod a+x ~/auto | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install build & twine | |
| run: python -m pip install build twine | |
| - name: Create release | |
| run: | | |
| echo "@${{ github.actor }} is creating a release triggered by ${{ github.event_name }}" | |
| if [ "${{ github.event_name }}" = workflow_dispatch ] | |
| then opts= | |
| else opts=--only-publish-with-release-label | |
| fi | |
| ~/auto shipit -vv $opts | |
| env: | |
| PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
| # vim:set sts=2: |