Skip to content

fix(ci): script to update versions #261

fix(ci): script to update versions

fix(ci): script to update versions #261

Workflow file for this run

name: test
on:
push:
branches:
- feat/ga
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn install --no-immutable
- name: Update Ketchup Version with Timestamp
run: |
cd packages/ketchup
VERSION=$(node -p "require('./package.json').version")
TIMESTAMP=$(date +%Y%m%d%H%M%S)
NEW_VERSION="${VERSION}-${TIMESTAMP}"
echo "New version: $NEW_VERSION"
sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" ./package.json
- name: Update Ketchup React Version with Timestamp
run: |
cd packages/ketchup-react
VERSION=$(node -p "require('./package.json').version")
TIMESTAMP=$(date +%Y%m%d%H%M%S)
NEW_VERSION="${VERSION}-${TIMESTAMP}"
echo "New version: $NEW_VERSION"
sed -i "s/\"version\": \"$VERSION\"/\"version\": \"$NEW_VERSION\"/" ./package.json
- name: Run Ketchup build
run: npm run k:build
# - run: npm run publish:snapshot
# env:
# NODE_AUTH_TOKEN: {{ secrets.NPM_TOKEN }}