diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..b462f600 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish to pypi on Github release + +on: + release: + types: [published] + +jobs: + pypi-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install build & twine + run: python -m pip install build twine + + - name: Publish to pypi + run: | + python -m build + twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..fa55b1f5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Auto-release on PR merge + +on: + # ATM, this is the closest trigger to a PR merging + push: + branches: + - master + +env: + AUTO_VERSION: v10.37.6 + +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: + - uses: actions/checkout@v3 + + - name: Prepare repository + # Fetch full git history and tags + run: git fetch --unshallow --tags + + - name: Unset header + # checkout@v2 adds a header that makes branch protection report errors + # because the Github action bot is not a collaborator on the repo + run: git config --local --unset http.https://github.com/.extraheader + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Download auto + run: | + auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" + wget -O- "$auto_download_url" | gunzip > ~/auto + chmod a+x ~/auto + + - name: Create release + run: | + ~/auto shipit -vv + env: + GH_TOKEN: ${{ secrets.AUTO_USER_TOKEN }} diff --git a/setup.cfg b/setup.cfg index 2dc8279c..acf241c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,15 +14,16 @@ classifiers = Operating System :: OS Independent Programming Language :: Python :: 3 Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Software Development Topic :: Software Development :: Libraries :: Python Modules [options] packages = find: -python_requires = >= 3.7 +python_requires = >= 3.8 install_requires = click etelemetry >= 0.2.0