Skip to content

Commit ac46d36

Browse files
committed
ci: inline CI steps in publish workflow, remove reusable workflow call
Calling ci.yml as a reusable workflow while it also triggers independently on push to production caused a workflow file error (0s failure). Inlined all CI steps directly into publish.yml to avoid the conflict.
1 parent 44049b2 commit ac46d36

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
- development
88
- production
99
pull_request:
10-
workflow_call:
1110

1211
jobs:
1312
ci:

.github/workflows/publish.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ on:
66
- production
77

88
jobs:
9-
ci:
10-
uses: ./.github/workflows/ci.yml
11-
129
publish:
13-
needs: ci
1410
runs-on: ubuntu-latest
1511

1612
steps:
@@ -26,9 +22,27 @@ jobs:
2622
- name: Install dependencies
2723
run: npm ci
2824

25+
- name: Type check (server)
26+
run: npm run test:ts:back
27+
28+
- name: Type check (admin)
29+
run: npm run test:ts:front
30+
2931
- name: Build
3032
run: npm run build
3133

34+
- name: Verify plugin
35+
run: npm run verify
36+
37+
- name: Check version not already published
38+
run: |
39+
VERSION=$(node -p "require('./package.json').version")
40+
if npm view strapi-plugin-form-builder-cms@$VERSION version 2>/dev/null; then
41+
echo "Version $VERSION is already published on npm."
42+
exit 1
43+
fi
44+
echo "Version $VERSION is ready to publish."
45+
3246
- name: Get package version
3347
id: pkg
3448
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)