Skip to content

Commit

Permalink
ci: tweak GitHub action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Dec 20, 2024
1 parent bee8237 commit 80bebd5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/build-and-bump.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Build, minify, lower syntax, bump versions, update download counts & changelog
name: Build and bump

on:
push:
branches: [main]
paths:
- source/** # only trigger when source files were changed
- .github/workflows/build-and-bump.yml # or on updates to this file itself
workflow_dispatch: # allows manual triggering on GitHub
- source/**
- .github/workflows/build-and-bump.yml
workflow_dispatch:

permissions:
contents: write
Expand Down Expand Up @@ -43,7 +43,12 @@ jobs:
npx lightningcss --minify --browserslist \
--output-file="./theme.css" -- "./theme.css" || exit 1
# check for unsupported features via `doiuse`
# append style-settings (last, so not removed by minification)
cat <(echo && echo "/* @settings") ./source/style-settings.yaml <(echo "*/") \
>> ./theme.css
- name: check for unsupported features
run: |
violations=$(npx doiuse --browsers="$BROWSERSLIST" \
--config="./.doiuse-ignore.json" theme.css)
if [[ -n "$violations" ]]; then # `doiuse` does not exit with non-zero code
Expand All @@ -52,10 +57,6 @@ jobs:
exit 1
fi
# append style-settings (last, so not removed by minification)
cat <(echo && echo "/* @settings") ./source/style-settings.yaml <(echo "*/") \
>> ./theme.css
- name: bump version in manifest
run: |
version=$(grep --max-count=1 '"version"' "./manifest.json" | cut -d'"' -f4 | cut -d'.' -f2)
Expand All @@ -71,13 +72,13 @@ jobs:
- name: update changelog
run: |
git log :/bump.. --format="- %cs %s" | # commits since last `bump` commit
grep -vE "build|ci|refactor|style|bump" | # don't include internal changes
grep -vE "build|ci||style|bump" | # don't include internal changes
sed -E "s/^(- [0-9-]+) ([^ ]+): /\1 **\2**: /" >> "temp.md" # bold cc keyword
grep -v "^$" "Changelog.md" >> "temp.md"
mv -f "temp.md" "Changelog.md"
- name: commit
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "bump: version & update changelog"
commit_message: "bump: version bump & changelog update"
branch: ${{ github.head_ref }}
20 changes: 13 additions & 7 deletions .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
name: Ensure Conventional Commits-like PR titles
name: PR title

on:
pull_request_target:
types: [opened, edited, synchronize]
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review

permissions:
pull-requests: read

jobs:
semantic-pull-request:
name: Validate PR title
name: Check PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
# add `improv` to the list of allowed types
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
requireScope: false
subjectPattern: ^(?![A-Z]).+$ # disallow title starting with capital
types: | # add `improv` to the list of allowed types
improv
fix
feat
Expand All @@ -29,5 +37,3 @@ jobs:
docs
break
revert
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Close stale issues and PRs"
name: Stale bot
on:
schedule:
- cron: "18 04 * * 3"
Expand All @@ -11,12 +11,12 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
- name: Close stale issues
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# DOCS https://github.com/actions/stale?tab=readme-ov-file#all-options
# DOCS https://github.com/actions/stale#all-options
days-before-stale: 180 # ~6 months
days-before-close: 7
stale-issue-label: "Stale"
Expand Down
7 changes: 2 additions & 5 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,14 @@
- 2024-12-15 **feat**: setting to hide the status bar icon of the Harper plugin
- 2024-12-15 **docs**: improve some phrasing
- 2024-12-11 **chore**: tweak headings in longform notes
- 2024-12-11 **chore**: consistent file naming convention
- 2024-12-09 **docs**: update badges
- 2024-12-09 **docs**: formatting and minor fixes
- 2024-12-09 **feat**: new color scheme Gruvbox Light
- 2024-12-09 **feat**: new colorscheme `Gruvbox Dark`
- 2024-12-09 **feat**: new color scheme `Gruvbox Light`
- 2024-12-09 **feat**: new color scheme `Gruvbox Dark`
- 2024-12-06 **chore**: do not override callout icons (#320)
- 2024-11-22 **fix**: make link to relevant section of readme go to the correct place
- 2024-11-20 **feat**: add infobox on submission of own color scheme
- 2024-11-18 **feat!**: alternative color schemes
- 2024-11-17 **fix**: reduce indentation of unordered lists in callouts
- 2024-11-17 **chore**: rename `just` tasks
- 2024-11-12 **fix**: better contrast for success/error notifications
- 2024-11-07 **fix**: remove outdated vault launch styling
- 2024-11-04 **feat**: styling of success notices
Expand Down

0 comments on commit 80bebd5

Please sign in to comment.