Skip to content

Commit e7bc33b

Browse files
committed
Refactor release workflow to include version bump type as input
1 parent 21a5c64 commit e7bc33b

11 files changed

Lines changed: 3582 additions & 2471 deletions

File tree

.github/workflows/release.yml

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,44 @@
11
name: Create Tag/Release
2-
run-name: ${{ github.actor }} run build on ${{ github.repository }}
2+
run-name: ${{ github.actor }} release ${{ inputs.bump }} on ${{ github.repository }}
3+
34
on:
45
workflow_dispatch:
6+
inputs:
7+
bump:
8+
description: "Version bump type"
9+
required: true
10+
default: patch
11+
type: choice
12+
options:
13+
- patch
14+
- minor
15+
- major
16+
17+
permissions:
18+
contents: write
19+
520
jobs:
6-
create-release:
21+
release:
22+
name: Bump, tag and release
723
runs-on: ubuntu-latest
824
steps:
9-
- uses: actions/checkout@v4
25+
- name: Checkout code
26+
uses: actions/checkout@v4
1027
with:
11-
token: ${{ secrets.PAT_TOKEN }}
12-
- uses: actions/setup-node@v4
28+
fetch-depth: 0
29+
token: ${{ secrets.PAT_TOKEN }} # PAT so the pushed tag triggers tag.yml (publish)
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
1333
with:
14-
node-version: '20'
15-
- run: git config user.name "$GITHUB_ACTOR"
16-
- run: git config user.email ""
17-
- name: Version, prepare next release notes, and push
34+
node-version: "20"
35+
36+
- name: Install, build and smoke test
1837
run: |
19-
npm version patch
20-
CURRENT_VERSION=$(node -p "require('./package.json').version")
21-
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
22-
NEXT_VERSION="$MAJOR.$MINOR.$((PATCH + 1))"
23-
sed -i "s/^# Release Notes$/# Release Notes\n\n## $NEXT_VERSION\n\n---/" RELEASE_NOTES.md
24-
git add RELEASE_NOTES.md
25-
git commit --amend --no-edit
26-
git push --all
27-
git push --tags
38+
npm ci
39+
npm run build
40+
npm test
2841
42+
- uses: softwarity/release-flow@v1
43+
with:
44+
bump: ${{ inputs.bump }} # the value picked in the dropdown

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ An Angular directive that creates a [Material Design 3 split button](https://m3.
3333
- **Material Design 3 Compliant** - Follows M3 button specifications
3434
- **5 Button Variants** - Text, Filled, Tonal, Outlined, Elevated
3535
- **Responsive to Theme** - Automatically adapts to light/dark color schemes
36+
- **Toolbar-aware** - Text & outlined variants auto-adapt their label color inside a `mat-toolbar`
3637
- **MatMenu Integration** - Works seamlessly with Angular Material's menu component
3738
- **Material 3 Ready** - Uses M3 design tokens for theming (`--mat-sys-*`)
3839
- **Standalone Directive** - Easy to import in any Angular 21+ application
@@ -151,6 +152,10 @@ The `overrides` mixin accepts a map of tokens to customize the appearance:
151152
| `elevated-container-color` | `var(--mat-sys-surface-container-low)` | Container color for elevated variant |
152153
| `elevated-label-color` | `var(--mat-sys-primary)` | Label color for elevated variant |
153154

155+
### Adapting to the surrounding container
156+
157+
The transparent variants (`text` and `outlined`) inherit `--mat-toolbar-container-text-color`, so their label and chevron automatically match the text color of a surrounding `mat-toolbar` — just like a real `matButton`. Outside a toolbar they fall back to `var(--mat-sys-primary)`. The container variants (`filled`, `tonal`, `elevated`) keep their own label color over their own background. You can override any of this with the tokens above.
158+
154159
### Examples
155160

156161
```scss

RELEASE_NOTES.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
# Release Notes
22

3-
## 1.0.2
3+
## NEXT RELEASE
4+
5+
### Fixes
6+
- **Theming on Angular Material 17+**: migrated every button design token from the
7+
legacy `--mdc-*-button-*` names to the current `--mat-button-*` names — label and
8+
container colors, outline color, container shape (border-radius) and elevation
9+
shadow. Material no longer emits the `--mdc-*` tokens, so the directive previously
10+
fell through to its `--mat-sys-*` fallbacks and ignored any button-level
11+
customization coming from the Angular Material theme (e.g. `mat.button-overrides(...)`).
12+
The `--split-button-*` overrides and `--mat-sys-*` defaults are unaffected.
13+
- **Auto-adapt inside a `mat-toolbar`**: the transparent variants (text, outlined)
14+
now fall back to `--mat-toolbar-container-text-color`, so their label and chevron
15+
pick up the toolbar's text color automatically — matching how a real `matButton`
16+
behaves. The container variants (filled, tonal, elevated) are unchanged (they keep
17+
their own label color over their own background).
18+
19+
### Docs
20+
- README and demo documentation now describe the toolbar auto-adaptation behavior.
21+
- Demo playground gains a contrasted `mat-toolbar` example (the split-button's label
22+
follows the toolbar text color) and carousel pickers for the `variant` and Material
23+
`palette` selectors.
24+
25+
### Chore
26+
- Updated the dev/build toolchain to patched releases (Angular 21.2.x, Angular CDK/Material
27+
21.2.14) and pinned `undici`/`@babel/core` via npm `overrides`, clearing all high/moderate
28+
`npm audit` advisories. These are devDependencies only — the published package is unaffected
29+
(it ships nothing but `tslib` at runtime).
430

531
---
632

@@ -67,4 +93,3 @@
6793
- Includes hidden-trigger utility styles
6894

6995
---
70-

angular.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,8 @@
110110
"@schematics/angular:resolver": {
111111
"typeSeparator": "."
112112
}
113+
},
114+
"cli": {
115+
"analytics": false
113116
}
114117
}

0 commit comments

Comments
 (0)