1
- name : (CommandKit) Publish Dev Builds
1
+ name : Publish development builds
2
2
3
3
on :
4
+ schedule :
5
+ - cron : ' 0 */12 * * *'
4
6
workflow_dispatch :
5
- push :
6
- branches :
7
- - main
8
- paths :
9
- - ' packages/commandkit/**'
10
- - ' packages/create-commandkit/**'
11
- - ' packages/legacy/**'
12
- - ' packages/redis/**'
13
- - ' packages/i18n/**'
14
- - ' packages/devtools/**'
15
- - ' packages/devtools-ui/**' # this is not a package we want to publish, but devtools depends on it
16
- - ' packages/cache/**'
17
7
18
8
jobs :
19
9
publish :
20
- name : 🚀 Publish Dev Builds
10
+ name : Publish development builds
21
11
runs-on : ubuntu-latest
22
12
timeout-minutes : 10
23
13
steps :
24
14
- uses : pnpm/action-setup@v4
25
15
with :
26
- version : ' 9.15 .0'
16
+ version : ' 10.11 .0'
27
17
28
18
- uses : actions/checkout@v4
29
19
@@ -32,22 +22,22 @@ jobs:
32
22
node-version : 22
33
23
registry-url : https://registry.npmjs.org
34
24
35
- - name : 💾 Cache pnpm store
25
+ - name : Cache pnpm store
36
26
uses : actions/cache@v4
37
27
with :
38
28
path : ~/.pnpm-store
39
29
key : ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
40
30
restore-keys : |
41
31
${{ runner.os }}-pnpm-
42
32
43
- - name : 🍳 Install dependencies
33
+ - name : Install dependencies
44
34
run : pnpm install --frozen-lockfile
45
35
46
- - name : 🔢 Set version suffix
36
+ - name : Set version suffix
47
37
id : version
48
38
run : echo "suffix=-dev.$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
49
39
50
- - name : 📝 Update package versions
40
+ - name : Update package versions
51
41
run : |
52
42
suffix="${{ steps.version.outputs.suffix }}"
53
43
for dir in packages/*; do
@@ -61,13 +51,12 @@ jobs:
61
51
"
62
52
done
63
53
64
- - name : 🧱 Build packages
65
- run : pnpm build
54
+ - name : Build packages
55
+ run : turbo build --filter='./packages/*'
66
56
67
- - name : 🚀 Publish each package
57
+ - name : Publish packages
68
58
env :
69
59
NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
70
- # NPM_CONFIG_PROVENANCE: true
71
60
run : |
72
61
PACKAGES=(
73
62
"commandkit:packages/commandkit"
@@ -81,11 +70,11 @@ jobs:
81
70
82
71
for entry in "${PACKAGES[@]}"; do
83
72
IFS=":" read -r name path <<< "$entry"
84
- echo "📦 Publishing $name..."
73
+ echo "Publishing $name..."
85
74
(pnpm --filter="$name" publish --no-git-checks --access public --tag dev && echo "✅ Published $name") || echo "❌ Failed to publish $name"
86
75
done
87
76
88
- - name : 🚫 Deprecate previous dev versions
77
+ - name : Deprecate previous development versions
89
78
env :
90
79
NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
91
80
run : |
100
89
)
101
90
102
91
for pkg in "${PACKAGES[@]}"; do
103
- echo "📉 Deprecating previous dev version of $pkg..."
92
+ echo "Deprecating previous development version of $pkg..."
104
93
(
105
94
ALL_VERSIONS=$(npm info "$pkg" versions -json)
106
95
VERSION_TO_DEPRECATE=$(echo "$ALL_VERSIONS" | node -e "
109
98
const versionToDeprecate = devVersions[devVersions.length - 2];
110
99
console.log(versionToDeprecate);
111
100
")
112
- [ -n "$VERSION_TO_DEPRECATE" ] && npm deprecate "$pkg@$VERSION_TO_DEPRECATE" "Deprecated dev version." && echo "✅ Deprecated $VERSION_TO_DEPRECATE"
113
- ) || echo "⚠️ Skipped deprecation for $pkg (maybe not enough dev versions)"
101
+ [ -n "$VERSION_TO_DEPRECATE" ] && npm deprecate "$pkg@$VERSION_TO_DEPRECATE" "Deprecated development version." && echo "✅ Deprecated $VERSION_TO_DEPRECATE"
102
+ ) || echo "⚠️ Skipped deprecation for $pkg (maybe not enough development versions)"
114
103
done
0 commit comments