File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 45
45
- name : Read versions
46
46
id : version-check
47
47
run : |
48
- OLD=$(git show HEAD~1:packages/ui/package.json | jq -r .version )
48
+ OLD=$(npm view @synergycodes/axiom version 2>/dev/null || echo "0.0.0" )
49
49
NEW=$(jq -r .version packages/ui/package.json)
50
50
echo "old=$OLD" >> $GITHUB_OUTPUT
51
51
echo "new=$NEW" >> $GITHUB_OUTPUT
@@ -60,21 +60,21 @@ jobs:
60
60
61
61
pnpm ui build
62
62
63
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
64
-
65
63
cd packages/ui
66
- echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'beta' tag…"
67
- pnpm publish --access public --tag beta --no-git-checks
68
-
69
- echo "Adding 'latest' dist-tag to @synergycodes/axiom@${{ steps.version-check.outputs.new }}…"
70
- pnpm dist-tag add @synergycodes/axiom@${{ steps.version-check.outputs.new }} latest
71
-
72
- rm -f ~/.npmrc
64
+
65
+ # Check if version contains "beta"
66
+ if [[ "${{ steps.version-check.outputs.new }}" == *"beta"* ]]; then
67
+ echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'beta' tag…"
68
+ pnpm publish --tag beta --access public --no-git-checks
69
+ else
70
+ echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'latest' tag…"
71
+ pnpm publish --access public --no-git-checks
72
+ fi
73
73
else
74
74
echo "Version unchanged. Skipping build and publish."
75
75
fi
76
76
env :
77
- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
77
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
78
78
79
79
- name : Deploy Documentation to Production
80
80
uses : Azure/static-web-apps-deploy@v1
You can’t perform that action at this time.
0 commit comments