Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Read versions
id: version-check
run: |
OLD=$(git show HEAD~1:packages/ui/package.json | jq -r .version)
OLD=$(npm view @synergycodes/axiom version 2>/dev/null || echo "0.0.0")
NEW=$(jq -r .version packages/ui/package.json)
echo "old=$OLD" >> $GITHUB_OUTPUT
echo "new=$NEW" >> $GITHUB_OUTPUT
Expand All @@ -60,21 +60,25 @@ jobs:

pnpm ui build

echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

cd packages/ui
echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'beta' tag…"
pnpm publish --access public --tag beta --no-git-checks

echo "Adding 'latest' dist-tag to @synergycodes/axiom@${{ steps.version-check.outputs.new }}…"
pnpm dist-tag add @synergycodes/axiom@${{ steps.version-check.outputs.new }} latest

rm -f ~/.npmrc

# Check if version contains "beta"
if [[ "${{ steps.version-check.outputs.new }}" == *"beta"* ]]; then
echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'beta' tag…"
pnpm publish --tag beta --access public --no-git-checks

echo "Adding 'latest' tag to beta version…"
# INFO: The line below marks each beta version as latest. Once we publish stable version we should remove it
npm dist-tag add @synergycodes/axiom@${{ steps.version-check.outputs.new }} latest
else
echo "Publishing @synergycodes/axiom@${{ steps.version-check.outputs.new }} with 'latest' tag…"
pnpm publish --access public --no-git-checks
fi
else
echo "Version unchanged. Skipping build and publish."
fi
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy Documentation to Production
uses: Azure/static-web-apps-deploy@v1
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@synergycodes/axiom",
"type": "module",
"version": "1.0.0-beta.20",
"version": "1.0.0-beta.21",
"description": "A React library for creating node-based UIs and diagram-driven applications. Perfect for React Flow users, providing ready-to-use node templates and components that work seamlessly with React Flow's ecosystem.",
"keywords": [
"react",
Expand Down