Skip to content

chore: Add missing Prettier config dotfiles #339

chore: Add missing Prettier config dotfiles

chore: Add missing Prettier config dotfiles #339

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v17.0.0
with:
globs: |
README.md
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 . --count --show-source --statistics
- name: Run summary script
run: |
python ./.github/workflows/summary.py
- name: Set up environment
run: |
# Extract current version
CURRENT_VERSION=$(python -c "exec(open('./meta.py').read()); print(__version__)")
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
# Fetch previous version
git fetch --tags
PREVIOUS_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "PREVIOUS_VERSION=$PREVIOUS_VERSION" >> $GITHUB_ENV
# Check if version changed
if [ "$CURRENT_VERSION" = "$PREVIOUS_VERSION" ]; then
echo "version_changed=false" >> $GITHUB_ENV
else
echo "version_changed=true" >> $GITHUB_ENV
fi
- name: Create and push tag if version changed
if: env.version_changed == 'true'
run: |
git tag ${{ env.CURRENT_VERSION }}
git push origin tag ${{ env.CURRENT_VERSION }}
- name: Generate changelog
if: env.version_changed == 'true'
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Commit changes
if: env.version_changed == 'true'
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add CHANGELOG.md ./modules/_summary.txt
git commit -m "release: ${{ env.CURRENT_VERSION }}"
git push origin HEAD:master
- name: Move tag to new commit
if: env.version_changed == 'true'
run: |
git tag --force ${{ env.CURRENT_VERSION }}
git push origin --force tag ${{ env.CURRENT_VERSION }}