Skip to content

Commit c2dfb32

Browse files
committed
chore: set version to 1.0.0-alpha.1 and auto-tag alpha/beta/rc on publish
1 parent b3c77a2 commit c2dfb32

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,22 @@ jobs:
3232
id: pkg
3333
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
3434

35+
- name: Set npm tag
36+
id: tag
37+
run: |
38+
VERSION=$(node -p "require('./package.json').version")
39+
if [[ "$VERSION" == *"alpha"* ]]; then
40+
echo "tag=alpha" >> $GITHUB_OUTPUT
41+
elif [[ "$VERSION" == *"beta"* ]]; then
42+
echo "tag=beta" >> $GITHUB_OUTPUT
43+
elif [[ "$VERSION" == *"rc"* ]]; then
44+
echo "tag=rc" >> $GITHUB_OUTPUT
45+
else
46+
echo "tag=latest" >> $GITHUB_OUTPUT
47+
fi
48+
3549
- name: Publish to npm
36-
run: npm publish --access public
50+
run: npm publish --access public --tag ${{ steps.tag.outputs.tag }}
3751
env:
3852
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3953

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strapi-plugin-form-builder-cms",
3-
"version": "1.0.0",
3+
"version": "1.0.0-alpha.1",
44
"description": "Visual drag-and-drop form builder plugin for Strapi 5. Create, publish and embed forms on any website.",
55
"keywords": [
66
"strapi",

0 commit comments

Comments
 (0)