Skip to content

Added partial replace fucntionality #4

Added partial replace fucntionality

Added partial replace fucntionality #4

Workflow file for this run

name: Publishing
on: [push]
jobs:
test:
uses: ./.github/workflows/test.yml
publish:
name: Publish the client to the public registry
needs: [test]
runs-on: ubuntu-latest
env:
NPMRC: ${{ secrets.NPMRC }}
strategy:
matrix:
node-version: ['18.x']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Check for dev-version
if: ${{ contains(github.ref, 'master') }}
run: |
VERSION=`git log -1 --date=format:"%y%m%d%H" --format=%cd|head`
echo "version $VERSION"
"version": "4.1.1"
sed -i -E "s/(version\": \")([0-9]\.[0-9]\.)(.*)(\")/\1\2$VERSION\4/1" package.json
- name: Publish
run: |
echo "$NPMRC" > ~/.npmrc
npm publish