Skip to content

Merge pull request #396 from dbkeator/master #15

Merge pull request #396 from dbkeator/master

Merge pull request #396 from dbkeator/master #15

Workflow file for this run

name: Auto-release on PR merge
on:
push:
branches:
- master
jobs:
auto-release:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download auto
run: |
curl -vL -o - "$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" | gunzip > ~/auto
chmod a+x ~/auto
- name: Check whether a release is due
id: auto-version
run: |
version="$(~/auto version)"
echo "version=$version" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
if: steps.auto-version.outputs.version != ''
uses: actions/setup-python@v5
with:
python-version: '^3.8'
- name: Install Python dependencies
if: steps.auto-version.outputs.version != ''
run: python -m pip install build twine
- name: Create release
if: steps.auto-version.outputs.version != ''
run: ~/auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build & upload to PyPI
if: steps.auto-version.outputs.version != ''
run: |
python -m build
twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# vim:set sts=2: