Skip to content

πŸ› fix(common): honor multi-blank table spacing options #1629

πŸ› fix(common): honor multi-blank table spacing options

πŸ› fix(common): honor multi-blank table spacing options #1629

name: πŸ“¦ tox-toml-fmt
on:
workflow_dispatch:
inputs:
release:
description: "πŸš€ Release (semver bump)?"
required: true
default: "no"
type: choice
options: ["no", patch, minor, major]
push:
branches: ["main"]
paths:
- "common/**"
- "toml-fmt-common/**"
- "tox-toml-fmt/**"
- ".github/workflows/tox_toml_fmt_build.yaml"
- ".github/workflows/_build.yaml"
pull_request:
paths:
- "common/**"
- "toml-fmt-common/**"
- "tox-toml-fmt/**"
- ".github/workflows/tox_toml_fmt_build.yaml"
- ".github/workflows/_build.yaml"
schedule:
- cron: "0 8 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event.inputs.release && github.event.inputs.release != 'no' && '-release' || '' }}
cancel-in-progress: ${{ github.event.inputs.release == 'no' || github.event.inputs.release == null }}
jobs:
build:
uses: ./.github/workflows/_build.yaml
with:
package-name: tox-toml-fmt
pre-commit-mirror: tox-dev/tox-toml-fmt
secrets: inherit # zizmor: ignore[secrets-inherit]
permissions:
contents: write
id-token: write
pull-requests: read
release:
name: πŸš€ release
runs-on: ubuntu-24.04
environment:
name: release
url: https://pypi.org/project/tox-toml-fmt/${{ needs.build.outputs.version }}
permissions:
id-token: write
contents: write
if: github.event.inputs.release != 'no' && github.event.inputs.release != null && github.ref == 'refs/heads/main'
needs: [build]
steps:
- name: πŸ“₯ Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.RELEASE_TOKEN }}
persist-credentials: true
- name: πŸ“₯ Download source
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: source
path: .
- name: πŸ‘€ Show changes
run: git diff HEAD -u
- name: πŸ’Ύ Commit release
run: |
git config --global user.name 'Bernat Gabor'
git config --global user.email 'gaborbernat@users.noreply.github.com'
git commit -am "Release tox-toml-fmt ${VERSION} [skip ci]"
env:
VERSION: ${{ needs.build.outputs.version }}
- name: πŸ“₯ Download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
pattern: wheels-*
path: dist
merge-multiple: "true"
- name: πŸ‘€ Show wheels
run: ls -lth dist
- name: πŸš€ Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
skip-existing: true
- name: πŸ“’ Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
VERSION: ${{ needs.build.outputs.version }}
CHANGELOG: ${{ needs.build.outputs.changelog }}
run: |
git pull --rebase origin main
git tag "tox-toml-fmt/${VERSION}"
git push
git push --tags
gh release create "tox-toml-fmt/${VERSION}" \
--title="tox-toml-fmt/${VERSION}" --verify-tag \
--notes "${CHANGELOG}"
- name: πŸ”„ Trigger pre-commit mirror sync
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: gh workflow run main.yaml --repo "tox-dev/tox-toml-fmt"