Skip to content

Commit 11e11ff

Browse files
authored
Merge branch 'production' into development
2 parents db4482f + e3bc18e commit 11e11ff

3 files changed

Lines changed: 65 additions & 17 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: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name: Publish to npm
22

33
on:
4-
pull_request:
5-
types: [closed]
4+
push:
65
branches:
76
- production
87

98
jobs:
109
publish:
11-
if: github.event.pull_request.merged == true
12-
needs: ci
1310
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1413

1514
steps:
1615
- name: Checkout
@@ -25,25 +24,60 @@ jobs:
2524
- name: Install dependencies
2625
run: npm ci
2726

27+
- name: Type check (server)
28+
run: npm run test:ts:back
29+
30+
- name: Type check (admin)
31+
run: npm run test:ts:front
32+
2833
- name: Build
2934
run: npm run build
3035

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

52+
- name: Set npm tag
53+
id: tag
54+
run: |
55+
VERSION=$(node -p "require('./package.json').version")
56+
if [[ "$VERSION" == *"alpha"* ]]; then
57+
echo "tag=alpha" >> $GITHUB_OUTPUT
58+
elif [[ "$VERSION" == *"beta"* ]]; then
59+
echo "tag=beta" >> $GITHUB_OUTPUT
60+
elif [[ "$VERSION" == *"rc"* ]]; then
61+
echo "tag=rc" >> $GITHUB_OUTPUT
62+
else
63+
echo "tag=latest" >> $GITHUB_OUTPUT
64+
fi
65+
3566
- name: Publish to npm
36-
run: npm publish --access public
67+
run: npm publish --access public --tag ${{ steps.tag.outputs.tag }}
3768
env:
3869
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3970

71+
- name: Create git tag
72+
run: |
73+
git tag v${{ steps.pkg.outputs.version }}
74+
git push origin v${{ steps.pkg.outputs.version }}
75+
4076
- name: Create GitHub release
4177
uses: softprops/action-gh-release@v2
4278
with:
4379
tag_name: v${{ steps.pkg.outputs.version }}
4480
name: v${{ steps.pkg.outputs.version }}
45-
body: |
46-
Published from PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}
4781
generate_release_notes: true
4882

4983
ci:

package.json

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
{
2-
"version": "0.0.0",
3-
"keywords": [],
2+
"name": "strapi-plugin-form-builder-cms",
3+
"version": "1.0.0-alpha.2",
4+
"description": "Visual drag-and-drop form builder plugin for Strapi 5. Create, publish and embed forms on any website.",
5+
"keywords": [
6+
"strapi",
7+
"strapi-plugin",
8+
"form-builder",
9+
"forms",
10+
"drag-and-drop",
11+
"cms"
12+
],
13+
"license": "MIT",
14+
"author": "dev.cluna <dev.cluna@gmail.com>",
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/devCluna/strapi-plugin-form-builder-cms.git"
18+
},
19+
"bugs": {
20+
"url": "https://github.com/devCluna/strapi-plugin-form-builder-cms/issues"
21+
},
22+
"homepage": "https://github.com/devCluna/strapi-plugin-form-builder-cms#readme",
423
"type": "commonjs",
524
"exports": {
625
"./package.json": "./package.json",
@@ -67,11 +86,7 @@
6786
"strapi": {
6887
"kind": "plugin",
6988
"name": "strapi-plugin-form-builder-cms",
70-
"displayName": "",
71-
"description": ""
72-
},
73-
"name": "strapi-plugin-form-builder-cms",
74-
"description": "",
75-
"license": "MIT",
76-
"author": "dev.cluna <dev.cluna@gmail.com>"
89+
"displayName": "Form Builder CMS",
90+
"description": "Visual drag-and-drop form builder plugin for Strapi 5"
91+
}
7792
}

0 commit comments

Comments
 (0)